Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,161 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,904 people online right now. Registration is fast and FREE... Join Now!




Restarting a program

 
Reply to this topicStart new topic

Restarting a program

chickenkid11
6 Dec, 2007 - 07:55 AM
Post #1

New D.I.C Head
*

Joined: 28 Nov, 2007
Posts: 13


My Contributions
Is there a way to restart your program inside the program? Like if you asked the player if they wanted to play again, how would I restart it?
User is offlineProfile CardPM
+Quote Post

1lacca
RE: Restarting A Program
6 Dec, 2007 - 07:58 AM
Post #2

code.rascal
Group Icon

Joined: 11 Aug, 2005
Posts: 3,822



Thanked: 11 times
My Contributions
put something like this inside the main function:
CODE

do{

// your program here

}while(/*whatever condition to restart it*/);

// and it quits here if not restarted

User is offlineProfile CardPM
+Quote Post

chickenkid11
RE: Restarting A Program
6 Dec, 2007 - 08:17 AM
Post #3

New D.I.C Head
*

Joined: 28 Nov, 2007
Posts: 13


My Contributions
I should slap myself...

Thanks lol
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/1/08 11:49PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month