Extract SSID and BSSID from a file
I see a number of things that may help you improve your code.

Use the required #includes

The code uses ifstream which means that it should #include &lt;fstream&gt;.  It was not difficult to infer, but it helps reviewers if the code is complete.  In this case, the code needs the following:

#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;fstream&gt;


Separate concerns

Instead of having the single routine extract field and print them, I'd recommend separating those into separate functions.  It makes the code clearer and allows flexibility if, for example, you wanted to sort the entries before printing them.

Don't abuse using namespace std

Putting using namespace std at the top of every program is a bad habit that you'd do well to avoid.  I don't know that you've actually done that, but it seems so because the code within main omits the namespace in several places.

Fix the bug

Right now, the code reports the BSSID without the first character.  That's a bug caused because the first "-2" in the last line of GetSSIDAndBSSID should actually be -3.  Also, as pasted, your main is missing a closing }.

Be sure of your inputs

We are left to infer, from the sample and from your code, the format of the file that is to be parsed.  Perhaps you had to figure it out from samples yourself.  Either way, it's very helpful to document, as comments, just exactly what the code is expecting so that if any of those assumptions ever need to change, it will be clear what needs to be changed.  For example, it appears that there is an implicit assumption that the last ":" on the line is used to figure out the substring length that includes the two fields of interest.  However, it appears to me that the fields are of fixed width, which would make it very efficient to simply used a fixed index into the string.  Also, your code seems to assume but doesn't test that the first character on the line is "'".

Use consistent formatting

The code as posted has inconsistent indentation which makes it hard to read and understand. Pick a style and apply it consistently.