I'm trying to convert LPWSTR to LPSTR withi this:
LPWSTR *argvw;
int argc;
argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
LPSTR argv = new CHAR[argvw->size()+1];
WideCharToMultiByte(CP_ACP, 0, argvw->c_str(), -1, argv, (int)argvw->size()+1, 0, 0);
but I'm getting this:
main.cpp:14: error: request for member 'size' in '* argvw', which is of non-clas
s type 'WCHAR*'
main.cpp:15: error: request for member 'c_str' in '* argvw', which is of non-cla
ss type 'WCHAR*'
main.cpp:15: error: request for member 'size' in '* argvw', which is of non-clas
s type 'WCHAR*'
How should I convert this properly?
Regards