What do you need to do in order to be able to see the program results. The programs run and disappear in a flash. I was told to leave "cin.get()" just before the end of the program, but that still doesn't work. Urgent Help!!!!
What do you need to do in order to be able to see the program results. The programs run and disappear in a flash. I was told to leave "cin.get()" just before the end of the program, but that still doesn't work. Urgent Help!!!!
ARRRRRRRGGGHHH search the board. This has been replied to millions of times.
-
You're probably doing something weird .
Just declare a variable: char b;
then just place: cin>>b; at the end of the program and see if that works for ya.
I always just add the following to the end of my program...
Code:// The following halts the program waiting for the // user to press the '"Enter Key" to quit. cout << "\n\n"; cout << "Press Enter key to quit: "; cin.ignore(80, '\n'); cin.get();
I usually use good ol' getch. Make sure to include <conio.h> though.
[code]
//other code
getch();
return 0;
}
[code]
This will exit the main loop as soon as any key is pressed.
i always use
getchar();
or
system("pause");
What is C++?