For an assignment, I am required to have command line arguments for my C program. I\'ve used argc/argv before (in C++) without trouble, but I\'m unsure if C style strings ar
The prototype of the main function says you're dealing with char* pointers. In C, there is no operator overloading; therefore, == between two char* will test if they point to the same place. This is not the case, and is rarely the case at all. Use the strcmp (the reference for the function is valid even though it points to a C++ site) function from :
strcmp(argv[1], "-e") == 0