Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Sponsored Links



Problem of "return 0" in C

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 01-10-2009
Member
 
Join Date: Aug 2009
Posts: 40
Problem of "return 0" in C

I am currently using the C language tutorial, i have created loop menu to choose no between 1 to 5. When I compile my IDE, my program is launched and I entered "1" for a player mode, my program stops and instead of displaying "return 0x0", he shows a number extension.
Reply With Quote
  #2  
Old 01-10-2009
Zecho's Avatar
Member
 
Join Date: May 2008
Posts: 2,267
Re: Problem of "return 0" in C

Did you correct all instances in code? When the loop get corrupted? Check all the semicolon given in front of menu. For example : Scanf ( "% d", Menu); Check the mistake in this declaration.
Reply With Quote
  #3  
Old 01-10-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Problem of "return 0" in C

For example :
Code:
 scanf ( "% d", & chooseMenu); 
  chooseMenu = 0; 
  switch (chooseMenu) 
  (

You will not forget to fix this in passing: scanf ( "% d", chooseMenu);
Reply With Quote
  #4  
Old 01-10-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Problem of "return 0" in C

In C, when you declare a function (number 0 to 5), what types of parameters and order of arguments, is depend on return 0 and everything was an int unless specified otherwise (there was no void), so it was natural for main to return int.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Problem of "return 0" in C"
Thread Thread Starter Forum Replies Last Post
Return keyword does not give value of variable "ast" MKAIF Software Development 5 04-03-2010 07:40 PM
VB Argument not optional" function return" Guns-n-Roses Software Development 3 18-08-2009 12:35 PM
Can't get DOS "for" loop to return full filenames with spaces dtronvig Windows XP Support 8 02-06-2009 12:09 PM
Type.GetTypeFromProgID("WMSServer.Server") return null michaelitrn MediaCenter 2 25-02-2009 02:31 AM
Uninstall "Microsoft Update" and return to "Windows Update" jabarnut Windows Update 14 13-07-2005 09:28 AM


All times are GMT +5.5. The time now is 03:48 AM.