I changed the language set to "Use unicode", and now it works.
_TCHAR* argv[] to wstring
-
03-07-2022 - |
Domanda
I would like to convert a argv to wstring.
I tried
int _tmain(int argc, _TCHAR* argv[])
{
wstring sStartDir=L"";
if (argc==1)
{
//no params given
}
else
{
sStartDir=argv[1];
}
but the compiler said "No = operator compatible with this operand".
Thank you.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow