Hi all in here,
It is said that system("PAUSE"), automatically generated by dev-c++ for console application, to prevent console window of disappearing instantly would be not standard c++, furthermore it would be consume much of a computers resources. What is a good replacement for it?
I have been experimenting with the following code to replace it:
void waitReturn()
{ char c;
cout << "Return to continue...";
c=cin.get();
}
But this mostly requires that the return key has to be pushed twice. Is there any improvement to above function that it behaves just like system("PAUSE")?
Thanks a lot for your advice.
yap