I\'m trying to convert a TCHAR to a string as in:
std::string mypath;
TCHAR path[MAX_PATH];
GetModuleFileName( NULL, path, MAX_PATH );
I ne
When I really need to do it I use the following:
TCHAR infoBuf[32767];
GetWindowsDirectory(infoBuf, 32767);
And then I convert it to a wstring which can be converted to a standard std::string:
wstring test(&infoBuf[0]); //convert to wstring
string test2(test.begin(), test.end()); //and convert to string.