Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🟢 Foundation  ·  Lesson 01

Introduction to C++ – What is C++?

In this lesson: C++ for beginners — what it is, how it relates to C, why it's used for games and systems, and a first program with output.

What is C++?

C++ is a general-purpose programming language that grew out of C. It keeps C's speed and low-level control, and adds powerful tools for organising larger programs — most famously object-oriented programming with classes and objects. In short, C++ lets you write code that is both fast and well-structured.

Because it sits close to the hardware yet supports high-level ideas, C++ is a favourite wherever performance and control both matter.

A short history

C++ was created by Bjarne Stroustrup at Bell Labs. He started it in 1979 as "C with Classes" and the language was renamed C++ in 1983 — the ++ is C's own "add one" operator, hinting that C++ is "C, incremented." It has been standardised repeatedly, and modern versions like C++11, C++17 and C++20 keep adding useful features.

Why learn C++?

  • It teaches both procedural and object-oriented programming, so it broadens how you think about code.
  • It is extremely fast, which is why it is used in games, browsers and systems software.
  • It is a top choice in competitive programming thanks to its speed and the Standard Template Library.
  • Understanding C++ makes many other languages easier, since so many borrow its ideas.

Key features

FeatureWhat it gives you
Object-oriented programmingClasses and objects to model real things
Speed and controlClose-to-hardware performance like C
Standard Template LibraryReady-made containers and algorithms
Function overloading & templatesWrite flexible, reusable code
Rich standard libraryTools for I/O, strings, math and more

A first look at C++ code

Here is a tiny complete C++ program. Do not worry about every detail yet — later lessons explain each part.

main.cpp
#include <iostream>
using namespace std;

int main() {
    cout << "Welcome to C++!" << endl;
    return 0;
}
Output:
Welcome to C++!
  • #include <iostream> brings in input/output features.
  • main() is where the program starts.
  • cout prints text to the screen; endl ends the line.

You will write and run this yourself in the first C++ program lesson, after setting up a compiler.

Where C++ is used

  • Games and game engines (like Unreal Engine)
  • Operating systems and device drivers
  • Browsers and databases
  • Competitive programming and high-performance computing
  • Embedded systems and financial trading platforms

How this course is organised

We start with the basics — setting up a compiler, writing your first program, variables, input/output, loops and functions. Then we move to what makes C++ special: object-oriented programming (classes, inheritance, polymorphism) and the Standard Template Library. Each lesson has code you can run and practise with.

Summary

  • C++ is a fast, general-purpose language built as an extension of C.
  • It adds object-oriented programming, templates and the STL to C's speed.
  • Bjarne Stroustrup created it; modern versions keep it up to date.
  • It powers games, systems, browsers and competitive programming.
  • This course starts with basics, then OOP and the STL.

Frequently Asked Questions

What is C++?
C++ is a general-purpose programming language built as an extension of C, adding support for object-oriented programming among other features. It is fast, gives direct control over hardware and memory, and is used for software where performance matters, such as games, operating systems and high-frequency systems.
What is the difference between C and C++?
C++ contains almost all of C and adds major features on top, most notably classes and objects for object-oriented programming, plus references, function overloading, templates and the Standard Template Library. C is procedural only, while C++ supports both procedural and object-oriented styles.
Is C++ hard to learn for beginners?
C++ is larger than many first languages because it offers several programming styles, but you can start with a small, friendly subset — input, output, variables, loops and functions — and grow from there. Learning the basics first and adding object-oriented features later makes it very approachable.
Why is C++ still used today?
C++ remains popular because it combines high performance with powerful abstractions, letting programmers write fast code that is still organised and reusable. It powers games, browsers, databases, operating systems and trading systems, and is a favourite in competitive programming.
Who created C++ and when?
C++ was created by Bjarne Stroustrup at Bell Labs, beginning in 1979 as "C with Classes" and renamed C++ in 1983. It has been standardised many times since, with modern versions such as C++11, C++17 and C++20 adding major new features.
← Back to C++ Tutorial
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

💻 Live Code Editor

This page's programs are ready here — run them, edit them, and learn. No installation needed.
Powered by OneCompiler. The code loads into the editor automatically — press Run to see the output. If the editor does not open, open it in a new tab.
Next topicC++ vs C Language Your progress: 1 / 81 (1%) · Lesson 2 / 81 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free