Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old 09-12-2008, 01:13 PM
MeTh0Dz|Reb0rn's Avatar   
MeTh0Dz|Reb0rn MeTh0Dz|Reb0rn is offline
My Posts Are Moderated
 
Join Date: Jul 2008
Posts: 17
Rep Power: 0
MeTh0Dz|Reb0rn is an unknown quantity at this point
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

The break is there for completeness I would assume.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #22 (permalink)  
Old 09-12-2008, 01:14 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

Does it matter, though?
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #23 (permalink)  
Old 09-12-2008, 01:15 PM
MeTh0Dz|Reb0rn's Avatar   
MeTh0Dz|Reb0rn MeTh0Dz|Reb0rn is offline
My Posts Are Moderated
 
Join Date: Jul 2008
Posts: 17
Rep Power: 0
MeTh0Dz|Reb0rn is an unknown quantity at this point
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

In the context of running the code, no, but some people just like to have everything 'exact'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #24 (permalink)  
Old 09-12-2008, 01:16 PM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: On God's Planet
Posts: 9,589
Last Blog:
Web slideshow in JavaS...
Rep Power: 76
Xav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud ofXav has much to be proud of
Send a message via MSN to Xav
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

Like when I make all my XHTML 100% valid. I see.
__________________


Mr. Xav | Website | Forums | Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #25 (permalink)  
Old 09-12-2008, 09:32 PM
Aereshaa's Avatar   
Aereshaa Aereshaa is offline
Guru
 
Join Date: Apr 2008
Posts: 500
Rep Power: 9
Aereshaa is a jewel in the roughAereshaa is a jewel in the roughAereshaa is a jewel in the roughAereshaa is a jewel in the rough
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

It could also help if the implicit call to _exit(0) fails. It never does, though.
Also, there are if_integer and str2int functions in standard C, let alone C++.
It's called strtol. To get an int x from stdin:
Code:
char * str = malloc(200);
str = fgets(str,200,stdin);
char * s2;
int x = strtol(s,NULL,10);
free(s);

Last edited by Aereshaa; 09-12-2008 at 11:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #26 (permalink)  
Old 09-14-2008, 11:15 PM
Hawk1 Hawk1 is offline
Learning Programmer
 
Join Date: Sep 2008
Posts: 58
Rep Power: 1
Hawk1 is on a distinguished road
Default Re: Trying to figure out how to get my calculator to "Quit" on command given

this is all good stuff to know, thanks for the new knowledge so far guys, i appreciate it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Client who can't figure out what content they want to use kinn Search Engine Optimization 2 05-20-2008 05:23 PM


All times are GMT -5. The time now is 02:31 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads