| Back in the "old" days of K&R C, you could define main() as returning void, but that is now deprecated and should be defined to return an int value - the exit code for the application. The following are valid signatures for main() these days:
int main(void);
int main(int argc, char** argv);
int main(int argc, char* argv[]);
int main(int argc, const char** argv);
int main(int argc, const char* argv[]);
The second and third versions of the argument list with char* types is allowed, provided you want to modify the actual contents of the arguments at runtime (not recommended). So, the first and last two versions are preferred - the first only when you don't allow any arguments, and just want to ignore them if passed from a shell.
__________________
Sometimes, real fast is almost as good as real time.
|