I created a project in C++, and VS2010 created
int _tmain(int argc, _TCHAR* argv[])
{
string sInput;
string sOutput;
int iMode=0;
if (argc==3)
{
if (strcmp(argv[0], "-e")==0)
{
iMode = 1;
}
else if (strcmp(argv[0], "-d")==0)
{
iMode =2;
}
sInput=argv[1];
sOutput=argv[2];
}
}
As you can see I would like to treat the args as string, but I am not sure how to get from _TCHAR* to std::string.
Can somebody help? Thank you very much!