Structure Of C++ Program
Structure Of C++ Programming Language : Which is Basic For C++..
In this post we are discussed about the basic structure of C++ programming language. Here C++ language follow some rules to write a program. First of all if you are beginner and you don't learn any language than below question in your mind.
- you might have a one question that what is program?
So the answer of this question that program is the set of the instruction that follow by the programmer. And this instruction is followed by the C++ compiler. Or you can run your program in IDE or in command prompt.
If you need IDE for write the program of the C++ program than below link is for download the IDE for C++.
For download the CodeBlocks IDEWhich Language Prefer Before Learn C++ Language?
C++ structure provide the flexibility for writing the program. And provide better solution for the solution. If you are not learn C language than you experienced that C++ difficult but according to the professional programmer first you learn C and after learn C++ language you think that this is very simple language. Some concepts are add C++ language but you know the reason why this concept use in C++ language and what's improve this concept after using C++.
There are some difference between C and C++ language.
The above chart shows that there are many differences in both language. Due to one difference the C++language is more powerful than C.
- Why C++ language is more compatible with C ?
Here one most difference is C++ follows the Object Oriented Language while C language follows the Procedural Language. In Object Oriented Language there are below powerful functionality.
- Data Abstraction
- Inheritance
- Polymorphism
- Classes
- Objects
- Virtual Function
- Data Encapsulations
The above all concepts of the Object Oriented language make real world problem very easy and give a security of our personal data. Due to this reason the C++ programming language is more compatible with C language. There are many other differences you read on above documents.
- Design Procedure Of C++
- This language make programming very is for serious programmer.
- It is general purpose programming language for superset of C.
- It support various functionality of Object Oriented Programming Language like: Abstractions, Inheritance, Classes, Objects, Polymorphism and another extra features.
- This language generics programming language.
The Basic Structure Of C++ Program In OOP.
The structure of the C++ divides the program in different sections. So the below documents shows how C++ language follows the structure of the C++ program.
This is a simple C++ program. ➡️ // This is comment section and ignored by C++ compiler
#include<iostream> ➡️ // Header Section
using namespace std; ➡️ // This tells the compiler use this namespace.
int main() ➡️ // main function.
{
cout<<"Hello World"; ➡️ this is the body of the main function and compiler
return 0; ➡️ execute this parts.
}
A simple program without any concept of Object Oriented Programming.
Comments
Post a Comment
if you have any doubts, let me know