-
new to c++ programming
hello i am new to c++ i have made a very simple program, i took a class in college but i got frustrated with c++ and i dropped the class well anyways i bought a book and would like to give c++ antoher try and i was wonding about one thing, last night i wrote this simple program and when i go to run the program it all works fine i am using borland C++ 5.0 i want to write the words hello world on the screen i run the program and a small black box appears real fast with the words in it but it disappears i want to be able to keep the box on the screen with out it disappering how would i do that here is my code my teacher in college told me a way but i forgot it
#include <iostream.h>
int main()
{
cout << " Hello world!"<< endl;
return 0 ;
}
-
Code:
#include <iostream.h>
#include <conio.h>
int main()
{
cout << " Hello world!"<< endl;
getch();
return 0 ;
}
A lot of people do something like this. Its a bit gawky. Personally I prefer to run the programs within a dos console........
-
thanks fordy