CString
constructor should do the job, namely:
CString s(mac_address);
Beware if you are doing a
UNICODE
build then the constructor performs the necessary conversion of the provided
char
s into
wide char
ones.
[update]
if ( s.Left(1)==_T("L") )
{
s = _T("P");
for(int i = 1; i < 18; i++)
{
s += mac_address[i];
}
}
[/update]