#### Archived

This topic is now archived and is closed to further replies.

# I need help with C/C++

This topic is 6191 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I use Bloodshed Dev-C++, and none of the pause ideas have worked for me!!" Does anyone have a clue to make my game pause about a minute before exiting? I was told not to use system("pause"); so what do I use? Remember, I use Dev-C++, not VC++ or anyhting like that. ***************Main Menu********************** * 1. Say hi at cia007techie@home.com * * 2. Visit Josh at www.joshworks.freehomepage.com * * 3. Exit * ********************************************* cin>>choice;

##### Share on other sites
are you compiling a windows app or a (DOS) console app?
you might try Sleep(5000) to pause for 5 secounds if you are in windows (meaning you have included windows.h) if not, I believe the function is the same, but without the capital "S", so it becomes sleep(5000) or something like that, what GCC does Bloodshed uses? djgpp or mingw32? mingw32 comes with windows headers if you got all the files you need (w32api.tar.gz)

Hope that helps

##### Share on other sites
It uses Mingw. I am in console, and Ive tried that.

* 1. Say hi at cia007techie@home.com *
* 2. Visit Josh at www.joshworks.freehomepage.com *
* 3. Exit *
*********************************************
cin>>choice;

##### Share on other sites
There should be better ways of doing it than this, but here''s one way that should be platform-independent etc...

  #include time_t now;time_t one_minute;time(&now);one_minute = now + 60;while (one_minute > time(NULL)) ;

I can''t see why you''d want to do this, though

• 15
• 9
• 13
• 41
• 15