Oh, you mean something like this?
You have to make your program output the message you want when the user gives "-h" or "--help" through the command line. There are independent programs that display helpful information, such as "man" for linux.Code:mycmd -h mycmd --help
The simpler implementation for what you want, albeit ad-hoc, is something like the following:
Code:// Inside a loop if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "--help") == 0) { puts("Helpful message!"); }