C++ Tutorials
Learn C++ from the ground up — variables, pointers, OOP, STL, memory management, templates, and modern C++17/20 features.
Introduction to C++
Discover what C++ is, where it came from, why it still dominates competitive programming, game engines, and finance, and write your very first Hello World program.
Setting Up Your C++ Development Environment
Install GCC/G++ on Windows, macOS, and Linux, configure VS Code for C++ development, and learn essential compiler flags for writing better code.
Variables, Data Types and Operators
Master C++ fundamental types, the auto keyword, constants, all operator categories, type casting, and build a working student grade calculator.
Control Flow — Conditions and Loops
Master if/else, switch-case, all loop types, break/continue, and build real programs — a multiplication table and the Sieve of Eratosthenes.
Functions in C++
Learn to define and call functions, understand pass-by-value vs reference vs pointer, default arguments, overloading, recursion, and variable scope and lifetime.
Arrays and Strings
Master 1D and 2D arrays, array-to-pointer decay, std::array, C-strings, std::string methods, and type conversions — with a palindrome worked example.
Pointers and References
Understand pointers, address and dereference operators, pointer arithmetic, function pointers, references, and the key differences between them — with a swap worked example.
Object-Oriented Programming — Classes and Objects
Learn the class keyword, access specifiers, member functions, the this pointer, getters and setters, static members, and friend functions — with a BankAccount worked example.
Constructors and Destructors
Explore default, parameterised, copy, and move constructors, initialiser lists, delegating constructors, destructors, and RAII — with a full Student class worked example.
Inheritance in C++
Learn single, multilevel, and multiple inheritance, access control in inheritance, constructor/destructor order, the is-a vs has-a distinction, and a Vehicle hierarchy worked example.
Polymorphism in C++
Master compile-time and runtime polymorphism in C++ — virtual functions, abstract classes, vtables, and the override/final keywords with practical Shape hierarchy examples.
Operator Overloading
Learn how to give custom meanings to C++ operators for your own classes — covering member vs friend overloads, arithmetic, comparison, stream, and increment operators with a complete Fraction class example.
Templates in C++
Understand C++ templates deeply — function templates, class templates, full and partial specialisation, non-type parameters, variadic templates, and a complete generic Stack implementation.
STL — Vectors, Arrays and Deques
Master the most-used STL sequence containers in C++ — std::vector, std::array, and std::deque — with iterator invalidation rules, 2D vectors, and a complete student marks sorting example.
STL — Maps, Sets and Unordered Containers
Master C++ associative containers — std::map, std::unordered_map, std::set, std::unordered_set, multimap, and multiset — with complexity analysis and a complete word-frequency counter example.
STL — Algorithms and Iterators
Master the STL algorithm library and iterator model in C++. Learn sort, find, transform, accumulate, and more with lambda predicates — skills that top FAANG interviewers love to test.
File I/O in C++
Learn how to read from and write to files in C++ using ifstream, ofstream, and fstream. Work with text files, CSV data, and binary files with proper error handling.
Exception Handling in C++
Learn how to write robust C++ programs using try, catch, and throw. Understand the standard exception hierarchy, custom exception classes, noexcept, and how RAII keeps resources safe even when errors occur.
Memory Management and Smart Pointers
Understand stack vs heap memory, prevent leaks and dangling pointers, and master C++11 smart pointers — unique_ptr, shared_ptr, and weak_ptr — with RAII-based ownership models.
Lambda Functions and Functional Programming
Master C++ lambda expressions, closures, std::function, std::bind, and functional-style programming with STL algorithms to write cleaner, more expressive code.
Move Semantics and Rvalue References
Understand lvalues vs rvalues, rvalue references, move constructors, std::move, perfect forwarding, and the Rule of Five to write high-performance C++ that avoids unnecessary deep copies.
Concurrency and Multithreading
Learn to write concurrent C++ programs using std::thread, mutexes, atomic variables, condition variables, and std::async — with a producer-consumer queue as a practical worked example.
Modern C++ — C++11 to C++20 Features
A curated tour of the most impactful modern C++ features from C++11 through C++20, with a career roadmap for competitive programming and SDE roles at Indian and global companies.