Introduction to C++

Last Updated : 7 Mar, 2026

C++ is a general-purpose programming language that was developed by Bjarne Stroustrup as an enhancement of the C language to add object-oriented paradigm. The main features C++ programming language are as follows:

  • Low-level Access: C++ provides low-level access to system resources, which makes it a suitable choice for embedded systems, compilers, web browsers and operating systems.
  • Fast Execution Speed: C++ is one of the fastest high-level languages which makes it suitable for game engines.
  • Object-Oriented: Object-Oriented support helps C++ to make maintainable and extensible programs for. large-scale applications.
main_features_of_c_language

First C++ Program

The below C++ code shows the basic structure of a program. Learn more about how it works in this article.

C++
#include <iostream>
using namespace std;

int main() {
    cout << "Hello, World!";
    return 0;
}

Output
Hello, World!

Structure of the C++ program

The basic structure of a C++ program defines the standard way every program must be written; otherwise, it will cause a compilation error. The structure includes:

prim_s_algorithm_14
  1. Header File: #include <iostream> adds input/output objects (cin, cout, etc.) via the preprocessor. Common headers: fstream (files), string (strings), vector (STL), bits/stdc++.h (all-in-one).
  2. Namespace Declaration: using namespace std; allows direct use of standard names like "cout" without std::
  3. Main Function: int main() is the program’s entry point; execution starts here and returns an integer with 0 return mean successful execution.
  4. Comments: // for single line, /*....*/ for multi-line are ignored by the compiler and used only for code documentation.
  5. Statement: Contains executable code. Here, cout << "Hello World!", prints the text on the screen using the insertion operator (<<).
  6. Return: The return 0; statement terminates the main() function and indicates that the program executed successfully.

History of C++

C++ is an object-oriented, middle-level programming language developed by Bjarne Stroustrup at Bell Labs in 1979, originally called “C with Classes” and renamed to C++ in 1983. It extended C by adding features like classes, inheritance, and type checking to support object-oriented programming. Over time, it evolved through standards like C++98, C++11, C++17, C++20, and the latest C++23, adding modern features for performance and safety. Today, C++ remains widely used in system software, game engines, competitive programming, and high-performance applications.

cpp-history

Next Read : C++ vs Other Languages

Comment