Sorry, I'm a rookie in C. What I am trying to do is just to print something if --help parameter is entered to the terminal like ./program --help. So the code is this:
char *HELP = "--help"; char *argv1 = argv[1]; if (argv1 == HELP) { printf("argv[1] result isaa %s\n", argv[1]); } So even if I use --help parameter it does not pass through the if condition. So what could be the reason behind that?
warning: implicit declaration of function ‘strcmp’can be answered by entering the commandman strcmpwhich will tell you which file your function is defined in and therefore needs to be included. (If your OS is not *nix based, just google 'man strcmp' to get the same information)