Using "void main(...)" is just dead wrong. Microsoft uses it all the time and that's
mostly the reason other people immitate that wrong behaviour. Both in C as well
as C++ the correct usage is to use one of those:
-
int main() { ... }
-
int main(int argc, char* argv[]) { ... }
Using C++ a "return xxx" statement is optional in which case an implicit "return 0;"
is assumed at the end of the body of main(). C always requires an explicit return
statement, even if you'd just used an "exit(xxx);" at the end of the body of main().
Java uses a "public static void main(String[] args) method signature and I don't
know what C# does (I bet it's the same as Java).
For C and C++ however "void main(...)" is a big nono and your professor desrves
to be defenestrated or worse for using it ;-)
kind regards,
Jos