This is C++
At the windows cmd line user types
p3.exe X <data.txt
where "p3.exe" is the program name,
"X" will be a 1, 2, or 3,
and "data.txt" is some text file program uses for input.
Inside the main method, I'm expecting argv[1] to equal the string X typed at the cmd line. In fact, if I do
wcout << argv[1]
the output is "X" as expected.
So now I do this,
int main(int argc, char* argv[])
{
if (argc > 1)
{
if (argv[1] == "X")
{
//do stuff
}
}
return 0;
} // end main
But (argv[1] == "X") never evaluates to true
What am i missing or not understanding?