Here is my program:
The argument is found no problem, but the second if statement is NOT true. Why? Do I need to overload the operator==?Code:int main( int argc, char *argv[] ){ if( argc == 2 ){ cout << "Found an argument." << endl; cout << argv[1] << endl; // Displays 'auto' to the screen. if( argv[1] == "auto" ){ // This statement is NOT true... cout << "Found 'auto' argument." << endl; } } return 0; }
Help please.