#include<iostream.h>
void main()
{
cout<<"hello";
}
//IF WE COMPILE THIS PROGRAMME IT WILL NOT PRINT HELLO ON U'R SCREEN.TELL ME WHY & TELL ME PROCEDURE HOW IT PRINT USING COUT IN VC++

#include<iostream.h> // deprecated header
   void main() // wrong, wrong, wrong, wrong, wrong, wrong
   {
   cout<<"hello"; // a similar issue in C
 }

//IF WE COMPILE THIS PROGRAMME IT WILL NOT PRINT HELLO ON U'R SCREEN.TELL ME WHY & TELL ME PROCEDURE HOW IT PRINT USING COUT IN VC++

You do not end with a newline or a buffer flush. Before the program ends, output a newline or flush the output buffer.

Or maybe this.

And please don't post in ALL CAPS.

if u create a console application :
first in c++ use #include <iostream> not <iostream.h> it is two different files where the first is more enhanced than the other then u must add this statment after the includes :
using namespace std ;

compile....run....see hello...and have fun
note :from vc++ use ctrl+f5 to run the program

This article has been dead for over six months. Start a new discussion instead.