C++ Tutorial – Learn C++ Programming with examples

The C++ language is a direct descendant of the C programming language with additional features such as type checking, object-oriented programming, and exception handling. You can call it "better C". Developed by Bjarne Stroustrup.

C++ is a general purpose language. Generic simply means that it is designed for developing applications in a wide variety of fields.

C++ Tutorial

Read these tutorials in the order presented to learn C++ programming. These tutorials are written for beginners, so you should have no trouble understanding them without prior knowledge of C++.

C++ Tutorial


Basics

1. First C++ Program – Hello World!
2. Variables and their types
3. Data types
4. Operators in C++

Control Statements

5. If, if..else-if statement
6. Switch Case in C++
7. For loop
8. while loop
9. do while loop
10. Continue statement
11. Break statement
12. goto statement

Functions

13. Functions in C++
14. Default arguments in Functions
15. C++ Recursion

Arrays

16. Arrays
17. Multidimensional arrays
18. Passing Array to function
19. C++ Strings

Pointers

20. Pointers in C++
21. this Pointer

OOPs

22. OOPs Concepts
23. Constructor
24. Destructor
25. Structure
26. How to pass and return struct from function
27. Enumeration
28. Inheritance
29. Polymorphism
30. Function Overloading
31. Function Overriding
32. Virtual Function: Run time Polymorphism
33. Encapsulation
34. Abstraction
35. Interfaces – Abstract class
36. Pass and return object from function
37. Friend class and friend Function

 

 

Features of C++

1) Better Memory Management - For better memory management, you can dynamically allocate memory at runtime using C++'s new and delete operators.

 2) Object Oriented - C++ supports object-oriented programming features. This means that you can use common OOP concepts such as abstraction, inheritance, encapsulation, and inheritance in your C++ programs. These features make writing code in C++ much easier. We will go into more detail in this tutorial series.

 3) Portability - Most C++ compilers support the ANSI standard that makes C++ portable. This is because code written on one operating system can run unchanged on another operating system. C++ is not completely platform independent. Because C++ has non-portable things like: B. Drawing graphics to the screen, because standard C++ doesn't have graphics or his GUI API. 

 4) Structured programming languages ​​- C++ has features that make it easy to break down problems into smaller blocks of code and structure programs in ways that improve readability and reusability.

 5) Exception handling - Like Java, C++ can handle exceptions, making them easier to identify and handle.

 6) Easier - Last but not least, it's easier to program in C++, as it is in C. Programming in C++ becomes much easier once you become familiar with the syntax of the C++ programming language.