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
Hi this is a late answer but I have an idea.
{wstring test = User;
std::wcout << test << std::endl;
string test2(test.begin(), test.end());
std::cout << test2 << std::endl;}
User is in this example the username as a TCHAR
.
Now I can use the name as a string
or wstring
.
This is the easiest way to convert the TCHAR
to a string
.