Hey! I GUARANTEE that I'm the most junior programmer here! I started programming VB about 2 months ago, and I started Dev-C++ yesturday!!! I actually have a quick question regarding Dev-C++, I would be very grateful for an answer on this ^_^
I have just purchaced the "Beginning C++ Game Programming" by Michael Dawson... and I'm very confused about the following function:
std::cout << "Press the enter key to exit";
std::cin.ignore(std::cin.rdbuf()->in_avail() + 1);
I am aware that by "int"ing the cout and cin things, I no longer have to type in the std bit:
cout << "Press the enter key to exit";
cin.ignore(cin.rdbuf()->in_avail() + 1);
But it just WONT work for some reason! As soon as the program has compiled, the screen flashes on and flashes off! Do you know how to make this function available to all of my created programs, so that I am able to manually close down my created program without the fustration of automatic return 0;!
For example, (I don't know if anyone is familiar with this source code, but I'll give it a mention anyway):
The "Lost_Fortune" program asks the user to input a number, then a smaller number and then your surname... I enter all of these things and then, (when it is supposed to show me my results) it flashes on and off so fast that I can't read it! I'm sure that you have had millions of junior programmers such as myself asking the same old question, but I would be grateful for a reply! Thanks all!
Thank you VERY much!!! All the best.