call main of a header file

in my header file there is a function which is called in main.
i want to call main in another file, how can do this?
In C++ you are not allowed to call main
Topic archived. No new replies allowed.