windows console probs
i am trying to program stuff, and whenever i run it on my compiler(borland), my console window pops up and down. looked in faq, it couldn't really help me. maybe someone could help me out by telling me how to change directory from a C: prompt, when i try to put in a "please press enter to continue..." type code, my console disapears. help.
You can use something like this:
cout<<"Please hit a key to continue."<<endl;
See the faq here:
As for why that happens, see here:
Use getch() just before you exit main().
Henroid, a long time back, I had posted this same querry on this very board.
And I am passing to you the reply given to me,hoping that someday,you too will give this reply to a novice C++ programmer and save his/her day.
Simple, ethier type
before the "return 0;" in int main()
before return 0; in int main()