I am trying to convert a char string to a wide char string.
Apart from the above, I have also tried these:PHP Code:
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
if (argc > 1)
{
wchar_t* arg1 = (wchar_t*) argv[1];
cout << arg1 << endl;
return 0;
}
else return 1;
}
http://www.cplusplus.com/reference/c...dlib/mbstowcs/PHP Code:
wchar_t* arg1 = argv[1];
I have also seen some suggest using "wcout" instead of cout:PHP Code:
wchar arg1[512];
mbtowcs(arg1, argv[1], 512);
but "wcout" isn't found:PHP Code:
wcout << arg1 << endl;
Code:: error: `wcout' was not declared in this scope
Bookmarks