C++ Tutorial-Learn C++ Programming with example
C++ Tutorial-Learn C++ Programming with example
About C++
C++ is a high-level, general-purpose programming language created
by Bjarne Stroustrup↗ as an extension of the C programming language, or
"C with Classes".
Compilers
There are many compilers for C++ like turbo C++, Visual Studio, Dev C++↗ and many more. We'll use Dev C++↗ for get rid from heavy software.
Basic of C++
Object Oriented Programming C++ (OOP)
Let us understand this C++ feature with the help of an example. Suppose you write a piece of code to find the name, age, and salary of an employee in Microsoft Windows and for some apparent reason you want to switch your operating system to LINUX. This code will work in a similar fashion as it did in Windows.
Basic of C++
- Structure of a Program (Basic of C++)
- Variable and their Types
- Data Types
- Escape Code
- Constant
- Operators
- Control Structure
- Functions
- Overload and Template
- Arrays
- Multidimensional Arrays
- C String
- Passing Array to functions
- Pointer
- this pointers
- File Streams
- Binary File Handling
Object Oriented Programming C++ (OOP)
- Concept
- Class Declarations
- Construction
- Destructor
- Structure
- Enumeration
- Inheritance
- Polymorphism
- Function Overloading and Overriding
- Virtual Functions
- Abstraction
- Friends Classes
- Exception Handling
- Casting
- Stack
- Queue
Feature of C ++
Here is the some feature od C++:
OOP (Object-Oriented Programming)
C++ is an object-oriented language,
unlike C which is a procedural language. This is one of the most
important features of C++. It employs the use of objects while
programming. We have briefly discussed all the 5 main concepts of object-oriented
programming.
The OOP concepts are:
- Data abstraction: Data abstraction is an act of representing the important features of data without including the background details or the method applied to obtain it.
- Data encapsulation: Data encapsulation is nothing but a process to implement data abstraction by wrapping up the data and functions into an exclusive block.
- Inheritance: The term inheritance refers to transferring the properties of the parent class to the child class. We can implement the basic idea of inheritance by creating more than one class, which we formally refer to as derived classes by linking them with what we call the base class. This concept reduces the redundancy of the program and makes it easy to transfer/copy the properties of one class to another
- Data hiding: Data hiding refers to protecting data from unauthorized access. It is basically responsible for securing the data. It is important to note that data encapsulation is different from data hiding as encapsulation mainly focuses on shifting the focus on important data than explaining its complex nature.
- Polymorphism: The word poly means ‘many’ and morphism means ‘forms’. Clearly, polymorphism refers to displaying that data in more than one form.
2. Platform or Machine Independent/ Portable
In simple terms, portability refers to using the same piece of code in varied environments.Let us understand this C++ feature with the help of an example. Suppose you write a piece of code to find the name, age, and salary of an employee in Microsoft Windows and for some apparent reason you want to switch your operating system to LINUX. This code will work in a similar fashion as it did in Windows.
JTGBET | Hotel & Casino - JT Hub
ReplyDeleteHotel 정읍 출장마사지 & Casino · JTGBET is an iconic destination for entertainment and leisure travelers, including travelers who 계룡 출장마사지 prefer a 의정부 출장샵 quick 경산 출장샵 escape or a 구미 출장마사지 relaxing