The real reason I asked this was because I would like to replace the standard main function:
Code:
int main(int *args, char *argv[]) {
return 0;
}
with something like this:
With a header file:
Code:
class Main;
int main(int *args, char *argv[]) {
Main prog(args, argv);
return prog.Start();
}
And the program 'entry point':
Code:
class Main {
public:
Main(int *args, char *argv[]);
int Start() {
/*....*/
return 0;
}
};
Where Argument is a class that has already parsed the arguments making them accessible thru a hash table or dictionary.
The idea was to have the 'real' main function in a header file and the entry point that the programmer would see was instead a class called Main or something like that. Suppose it was a pretty stupid idea to start with anyway.