#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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.