Arguments parsing error
I am trying to parse the run-arguments within my console application with
this code:
int _tmain(int argc, _TCHAR* argv[])
{
if(argv[1] == _T("arg1")) cout<<"Argument1 was passed";
_getch();
return 0;
}
My code doesn't work. I mean, it runs, but the console is empty. I am
compiling with Use Unicode Character Set option in Visual Studio 2012 (on
Windows 7). Where is my mistake?!
No comments:
Post a Comment