I know how to Puase the screen, But with Microsoft Visual 6 it wont let me. It puts it in the wrong place and screws up my program. Please help.
Printable View
I know how to Puase the screen, But with Microsoft Visual 6 it wont let me. It puts it in the wrong place and screws up my program. Please help.
So... what are you trying to use to pause it? What exactly's happening?
try using endl like this:
Code://this
cout << "Test" << endl;
//as compared to this
cout << "Test\n";
you mean just do a pause with msvc++ 6.0?
just do this:
#include <conio.h>
int main()
{
cout<<"Hello, now this program will pause"<<flush;
_getch();
return 0;
}
ok, if you are outputting something right before the pause, make sure you put in the flush, otherwise it won't print until you hit a key and the program continues. make sure after _getch() you have trailing semicolon: _getch();
try this!
#include <conio.h>
#include<iostream.h>//must include
int main()
{
cout<<"Hello, now this program will pause"<<flush;
_getch();
return 0;
}
hello,guys
can i know why u put the #include<conio> function in there?
one more thing!!
why u put "FlUSH" behind the <<cout<< heLOO <<
and what is the function of _getch ??
conio is the library for _getch, which waits for a user to press a key.