Examples, usage, help in C++ program

I have written a C++ program to perform raytracing and would want to write some functions to help the user: examples, usage, help

I am wondering how this is done. Would I just put some functions in the main program?

How to do it depends on what you already have and what exactly you want to do.

You're vague on both, so it's difficult to help.

Here's an example of how you'd do it in C:

int main(int argc, char *argv[])
{
        int n;
        for(n=1; n<argc; n++)
        {
                if(strcmp(argv[n], "--help") == 0)
                {
                        print_help();
                        exit(0);
                }
        }
}

That's what I've done. My question is where to put the function print_help();

I do have a few functions and they are quite long. They involve
sending information to the user. I have now put them in another
file.

Wherever you like. You can put them in the same file, or not. Just make sure to have headers for them if you put them in a different file.