hmmm,odd it works.....*embarresed*.....
Well now i know this is possible i'l figure it out,
thank you very much
hmmm,odd it works.....*embarresed*.....
Well now i know this is possible i'l figure it out,
thank you very much
void main() is somewhat valid, but it mostly depends on the compiler. Some compilers might not accept it, mine does (and so does other Borland ones). But it's still not a good habit to get into. And the file isn't any smaller than if it were done the other way.
*alarms go off* void main alert! void main alert!Originally posted by Frobozz
void main() is somewhat valid, but it mostly depends on the compiler. Some compilers might not accept it, mine does (and so does other Borland ones). But it's still not a good habit to get into. And the file isn't any smaller than if it were done the other way.
Read very carefully: void main is not the least bit valid. It is not now, nor was it ever valid C or C++. It only depends on the compiler whether or not it will catch your blatant error. This isn't like some other things like goto that is sometimes acceptable when used correctly; void main is never, ever acceptable.
Please don't argue this. Just nod your head and accept the fact that you'll never use void main again. Otherwise, you'll provoke everyone on the C Board to come after you quoting the ISO and ANSI standards and the creator of C++. You don't want that. If you'd like to know the many reasons why void main is completely unacceptable, perform a search of this board.
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.