How to Write a program in C++
First program in a C++
//My first C++ program#include<iostream.h>
void main()
cout<<"Enter your name\n";
cin>>name;
cout<<"welcome"<<name<<"\n";
}
getch();
Describing of a program
//My first C++ program-----------is a comment compiler not executed comments. comments are
only use in program for understand a program quickly.
#include<iostream.h>
# sign statement is represent directrites for the preprocessor, these type of statements are
proceed before compile.
#include represent for insert header file like iostream.h
Void Main() or int main()
from here main program is starting.
Comments
Post a Comment