3 Replies - 276 Views - Last Post: 19 May 2012 - 08:24 AM Rate Topic: -----

#1 Bazzalisk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 19-May 12

Delay and separating main .cpp file

Posted 19 May 2012 - 02:29 AM

Ok i have a few question, not to do with errors, im not sure if this is the wrong section?
Anyway, How do I create delay, e.g)I want some one to wait 5 seconds then press any key, but if they press a key within 5 seconds it will cout << "NO".

Also, I'm creating a text game and i wanted to make a story for it and I have my menu and I'm about to type up the story for it but i don't want to have 30 lines of text for me to scroll through everytime i want to go towards the bottom. So my question is, do i make a .h file or a .cpp file to put the text in and how do i make the main file open up the .h/.cpp file?

a part of the code where i want to insert the story:
	char storychoice(2);
	                        system ("CLS");
				cout << "New Game: Play Introduction?\n 1. Yes\n 2. No\n 3. Back\n\n";
				cin >> storychoice;
                                >>> This is where i want it to open the story <<<



Thank you!!! ^^

Is This A Good Question/Topic? 0
  • +

Replies To: Delay and separating main .cpp file

#2 Bazzalisk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 19-May 12

Re: Delay and separating main .cpp file

Posted 19 May 2012 - 03:41 AM

Ok, now i only need to know how to delay. I figured out how to sort out my other problem.
Was This Post Helpful? 0
  • +
  • -

#3 aresh  Icon User is offline

  • It's a 16-Bit World!
  • member icon

Reputation: 269
  • View blog
  • Posts: 3,821
  • Joined: 08-January 12

Re: Delay and separating main .cpp file

Posted 19 May 2012 - 08:05 AM

Will this link be of any help ??
Was This Post Helpful? 0
  • +
  • -

#4 Bazzalisk  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 43
  • Joined: 19-May 12

Re: Delay and separating main .cpp file

Posted 19 May 2012 - 08:24 AM

accualy, im sorry. i wish i could close this because i've already found out both of them. thank you anyway :).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1