Saving hex values to a C++ string
<p>I have a simple question but was not able to find an answer on the internet.
I am using the native WiFi API of Windows and trying to get the MAC of an access point.</p>

<p>Inside a structure of type WLAN_BSS_ENTRY there is a field named dot11Bssid which is basically an array of 6 unsigned chars.</p>

<p>What I want to do, is to have the MAC address in an std::string like this: 'AA:AA:AA:AA:AA:AA'.</p>

<p>I can print the adress like this:</p>

<pre><code>for (k = 0; k &lt; 6; k++) 
{
    wprintf(L"%02X", wBssEntry-&gt;dot11Bssid[k]);
}
</code></pre>

<p>But I am unable to find a way of moving this values to a string with the format identified above.</p>

<p>Help is appreciated, if you wonder why do i want this in a string, I have the need to compare it with a string formatted that way.
Thanks in advance for your time.</p>
