Use void main and i will come to your house with a dull spoon and castrate you. If that isnt bad enough, im bringing govtcheez and -ken- with me.
Use void main and i will come to your house with a dull spoon and castrate you. If that isnt bad enough, im bringing govtcheez and -ken- with me.
Why do people kill, rape, and steal? Why don't we all just get along in peace? Why do authors write void main()?
The answer is simple: people are idiots. If an author doesn't know how to properly define main(), I wouldn't trust him about a darn thing. Get yourself a better book is my advice.
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.
>Use void main and i will come to your house with a dull spoon and castrate you. If that isnt bad enough, im bringing govtcheez and -ken- with me.
Yikes, now that would be scary.
Who's that author that always gets the "not recommended" rating from that academic computing org? You know the one that comes out with like 5 books a year. I wonder if he uses void main()?
Yes he does and no he doesn't:Originally posted by swoopy
>Use void main and i will come to your house with a dull spoon and castrate you. If that isnt bad enough, im bringing govtcheez and -ken- with me.
Yikes, now that would be scary.
Who's that author that always gets the "not recommended" rating from that academic computing org? You know the one that comes out with like 5 books a year. I wonder if he uses void main()?
This statement is immediately followed by the example:Code:## You are therefore free to declare main() as required by your ## program.
void main (void)
even though the text of the standard directly opposite states that this is undefined. Indeed, the text I quote makes me wonder whether Schildt believes that:
struct foo { int i; double d; } main (double argc, struct foo argv)
is permitted !
Most of the examples in the book declare main() as void. I won't bother to point them out individually.
Obtained from:
http://www.lysator.liu.se/c/schildt.html
But later he states:
Indeed it is not. If main() is declared as void, I don't know of any compiler that will return 0. Indeed, the standard forbids it to !Code:## Though most compilers will automatically return 0 when no other ## return value is specified (even when main() is declared as ## void), you should not rely on this fact because it is not ## guaranteed by the standard.
Last edited by Lynux-Penguin; 07-12-2003 at 06:45 PM.
Asking the right question is sometimes more important than knowing the answer.
Please read the FAQ
C Reference Card (A MUST!)
Pointers and Memory
The Essentials
CString lib
Guys its easy, void main is NOT and NEVER WILL BE C++!!!! PERIOD!
So complex...
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.
pick
c how to program
by deitel& deitel