Friday, July 31, 2009

Having problems with Turbo C++ 3.0!! Help?

Here's my code:





#include%26lt;iostream.h%26gt;


void main()


{


cout%26lt;%26lt;"Hello World";


}








I wrote the program, compiled it succesfully without any error but when i run it the window is displayed only for a split second and then vanishes.

Having problems with Turbo C++ 3.0!! Help?
try


#include %26lt;iostream.h%26gt;


#include %26lt;conio.h%26gt;


void main()


{


cout%26lt;%26lt;"Hello World";


getch();


}





if it doesnt work , try without ; in getch , i mean getch()
Reply:U should have included another header file #include%26lt;conio.h%26gt; which would have helped the screen to display its contents properly.


No comments:

Post a Comment