hi, I coded this:
at console I need to launch program so: program.exe hiQt Code:
int main (int argc, char* argv[]) { cout << argv[1] << endl; if (argv[1] == "hi") cerr << " hello\n"; char* p = "hi"; if (p == "hi") cout << "hello\n";To copy to clipboard, switch view to plain text mode
and I don't understand why cout prints 'hi' but the first if isn't executed. isn't argv an array of char* ??? then why then second if is executed???
thanks
Bookmarks