-
newbie C++ question
When I write a program (the one in the tutorial where basicly you type in your age and if it's less than 100 it says your young, if you are 100 it says you are old and if you are older than 100 it says you are very old) and after you type in your age and press enter, you can't see the message, the little DOS window thing just dissapears.
-
im a newb too, but what i usually do, is put another cin>> thing at the end
-
Code:
#include <conio.h>
....
getch();
return 0;
the program will wait for u to hit a key. There are many ways to do this, just search the board.
-
You can configure console applications doing this in their
properties.
-
Another way..
Code:
#include <conio.h>
...
while(!kbhit());
-
Code:
#include <iostream>
int main()
{
//code
std::cin.get();
return 0;
}
do a search though, and look at the FAQ, they are answered there.
-
#include <stdlib.h>
int main()
{
//code
system("PAUSE");
}