KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
int main (int argc, **argv) { if (argv[1] == "-hello") printf("True\n"); else printf("False\n"); } # ./myProg -hello False Why? I realize strcmp(argv[1], "-hello") == 0 returns true... but why can't I use the equality operator to compare two C strings?
Tags (comma-separated)
Save Edits
Cancel