The
main() FunctionAll C++ programs have a special function called
mainThe basic template for
main is:void main(void) { data declarations statements}
You will see other headers for main such as:
int main() void main()
If you use the
int main() version, the final statement in main should be return 0.int main(void) { data declarations statements return 0; }Previous page