.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

BCT Commander- Save $6.00
World Supremacy- Save $10.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old February 11th, 2001, 07:16 PM

Zanthis Zanthis is offline
Corporal
 
Join Date: Jan 2001
Posts: 89
Thanks: 0
Thanked 0 Times in 0 Posts
Zanthis is on a distinguished road
Default Re: THE best strategy game of all times! :D

Instar wrote:
quote:

#include <stdio.h>
void main()
{
printf("Go lay an egg, you bumbling freak!\n");
}

Assuming this is C, main() must return an int. If your compiler accepts void as main()'s return type, you've been lucky. Obviously, this means you'd need to add a return statement returning zero.

Sorry for the nitpick. Seen this very error in college level books and it kinda annoys me knowing we are teaching future programmers bad habits.

[This message has been edited by Zanthis (edited 11 February 2001).]
__________________
-Zan
Reply With Quote
  #2  
Old February 11th, 2001, 10:18 PM
Instar's Avatar

Instar Instar is offline
Major
 
Join Date: Aug 2000
Posts: 1,246
Thanks: 0
Thanked 0 Times in 0 Posts
Instar is on a distinguished road
Default Re: THE best strategy game of all times! :D

What? I have seen that syntax, but I never understood why. It couldn't be the errorcode thingy returned to DOS, could it? (The exit() function does that)
I have never heard of the main func returning an int, and I'll always declare it void main (Unless its changed and I have to, or someone offers me money)
__________________
When a cat is dropped, it always lands on its feet, and when toast is dropped, it always lands with the buttered side facing down. I propose to strap buttered toast to the back of a cat. The two will hover, spinning inches above the ground. With a giant buttered cat array, a high-speed monorail could easily link New York with Chicago.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:18 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.