Hey all, I posted a question earlier this week regarding dev-c++ and my inability to keep the output window (#include <iostream>) open long enough to see my program running!
I have already tried the following things and would be grateful for any other suggestions!
1:
(Without typing using namespace std;) \\At the top
std::cout << "Press enter to exit";
std::cin.ignore(std::cin.rdbuf()->in_avail + 1);
return 0;
2:
(Typing using namespace std;) \\At the top
cout << "Press enter to exit";
cin.ignore(cin.rdbuf()->in_avail + 1)
return 0;
3:
#include <cstdio> \\At the top
cout << "Press enter to exit";
getchar();
return 0;
Someone please help! I seem to have tried everything! If anyone knows dev-c++, could you give me a sure fire way of keeping the output window open! Thank you!
(And thanks to the guys or gals who have already suggest ways to help!)