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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top