Jump to content
  • Advertisement

Archived

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

Joshman

I need help with C/C++

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


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

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

Share this post


Link to post
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.h>

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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!