Normally in C++ I would compare command line options as follows:
#include <string>
int main(int argc, char* argv[])
{
if (std::string(argv[1]) == "-h") /*Handle -h option*/
return 0;
}
This works just fine. But is there a way to do something similar in C?