C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 13th, 2005, 01:25 PM
mtss mtss is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 mtss User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 26 sec
Reputation Power: 0
visual studio2003, press any key to continue and poof-

Hi, I am taking a class in c++ entry univ level. I am not asking for my assignments done. I have done them , all 18 of them. The final, which was a beast consisted of overloaded functions and calculating either the area or volume of 5 geometric shapes. I have it working==almost. The problem is and I am not sure what to do, is that the compiler puts the message in "press any key to continue" and when you press any key, its exits the program. What I need is something to the effect "to calculate another press y, to exit press n. I know how to do the default if there are any other keys hit, just not sure how to make it go back to the top to redo. Thanks

Reply With Quote
  #2  
Old February 13th, 2005, 08:56 PM
Anibal Anibal is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 176 Anibal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 4 h 20 m 48 sec
Reputation Power: 4
Hey mtss....

If you simply want to redo, lock all the code between WHILE () statement and that should take care of it. Example:

Code:
 
key = <get the keythat was pressed>.... 
 
WHILE (key != <exit key>)
{
	/*--the aplication code!!--*/
}


I really don't know if that's what you're asking. But, what the hell!!

Good Luck

Anibal.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > visual studio2003, press any key to continue and poof-


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway