C++ Basic Code Stucture
Basic Code Structure:
There is the Basic Code Structure for Dev C++ Compilier.
Code:
// Basic Code Structure
# include <iostream>
using namespace std;
int main(){
// Your Code goes Here....
return 0;
}
For Other Compiliers:
Code:
// Basic Code Structure
# include <iostream.h>
using namespace std;
void main(){
// Your Code goes Here....
return 0;
}
Comments:
In C++ Programming if we want to write any note for programer help we use comments in Source Code.
There are Two types of comments:
1) Single-Line Comment.
2) Multi-Line Comment.
1. Single-Line Comment:
In Single-Line Comment we can comment only a single line. It starts with // Double forward slash.
For example :
// This is the basic structure.
//This is for single-line comment
2. Multi-Line Comment:
In Multi-Line Comment we can comment multiple lines as many we want. It starts with /* forward slash and the asterik and End with the */ asterik and the forward slash.
For example :
/*
this is mutli line comments
Happy Coding!
*/
No comments:
Post a Comment
Please Do not Enter any Spam Links in the Comment Box.