in a console app, how can that be done
Printable View
in a console app, how can that be done
cout<<"Press any key to continue..."<<endl;
getch();
I think getch is in conio.h
#include <iostream.h> //used for cout/cin
#include <stdlib.h> //needed for system pause
int main()
{
cout<<"Welcome to my program"<<endl;
system("pause");
return 0;
}
strange, because I've used it in VC++ and it worked perfectly.Quote:
me thinks the 'system("pause")' is used in bloodshed c++, i remember trying it in VC and it didnt work
It should be <iostream> and <cstdlib>, followed by the correct using statements :)Quote:
Originally posted by slx47
#include <iostream.h> //used for cout/cin
#include <stdlib.h> //needed for system pause
int main()
{
cout<<"Welcome to my program"<<endl;
system("pause");
return 0;
}