![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
The Supreme Ruler
![]() Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6
![]() |
You're going to have to make it pause. After the call to your start() method, just add a call to getchar().
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower Last edited by Mjordan2nd; Feb 24th, 2005 at 9:29 PM. |
|
|
|
|
|
#12 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
ok, ummm you lost me.
|
|
|
|
|
|
#13 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
Great! it works now two or three more questions.
1. how can i clear the screen? 2. can i pause the screen so you must press enter to begin the start()function? 3. if i wanna make another function, do i add the next() function at the end of the start()? -------------------- (edit) just ran into another problem, when i test it if i type in "goto the door" it exits the program. Last edited by AlphaXero; Feb 24th, 2005 at 9:36 PM. |
|
|
|
|
|
#14 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
are you using windows or linux
|
|
|
|
|
|
#15 |
|
Newbie
Join Date: Feb 2005
Posts: 8
Rep Power: 0
![]() |
Linux - fedora core 3
|
|
|
|
|
|
#16 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
OK at the top you must put
#include <cstdlib> system("clear"); //you can call any shell command like this.char ch;
do
{
cin.get(ch)
} while (ch!='\n'); //I think this will work but I have never tried it.
cin.clear(); /*I'm not sure if this is necessary, it's been a long time since I've used cin*/By the way good job using Linux -- it rules! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|