Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top