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
If you want the path in chars, you should call GetModuleFilenameA. That function takes LPSTR instead of LPTSTR.
GetModuleFilenameA
LPSTR
LPTSTR
Note that almost all Win32 functions that take or return strings have two version, one ending in A (ANSI?) and the other ending in W (wide).
A
W