Question

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.

Était-ce utile?

La solution

I changed the language set to "Use unicode", and now it works.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top