SrcForge

SrcForge C++ Tutorial Hub

Learn C++ through focused lessons, one topic at a time.

Start with the basics and move through syntax, data types, pointers, and references in a clean tutorial flow.

Navigation

Use the module cards below to jump directly into any topic.

C++ course enrollment

Enroll to save your C++ progress.

Track completed lessons, resume from your dashboard, and keep your C++ course progress synced to your account.

68 trackable lessons

Modules

Choose a module to start learning

Foundation

Getting Started with C++

What C++ is, how it differs from C, and how source code becomes a program.

Syntax Basics

The building blocks of a C++ program: types, tokens, expressions, and input/output.

Control Flow & Functions

Branching, looping, arrays, strings, scope, and the basics of reusable logic.

Intermediate

Pointers, Memory & Data

Pointers, references, memory allocation, files, and lower-level language mechanics.

Lesson 17

RAII (Resource Acquisition Is Initialization)

Learn RAII in C++ for automatic resource management and exception safety.

Open lesson

Lesson 20

Pointers

Learn pointers in C++ including memory addresses, dereferencing, and pointer arithmetic.

Open lesson

Lesson 21

Memory Diagrams for Pointers

Learn Memory Diagrams for Pointers in C++ with visual explanations, step-by-step examples, and fully commented code for beginners.

Open lesson

Lesson 22

References

Learn References in C++ with syntax, rules, examples, comparisons with pointers, best practices, common mistakes, and FAQs for beginners.

Open lesson

Lesson 23

Structures and Unions

Learn Structures and Unions in C++ with syntax, differences, memory layout, examples, common mistakes, best practices, and FAQs for beginners.

Open lesson

Lesson 24

Dynamic Memory (new/delete)

Learn Dynamic Memory (new/delete) in C++ with syntax, memory diagrams, examples, common mistakes, best practices, and FAQs for beginners.

Open lesson

Lesson 25

File Handling

Learn File Handling in C++ with ifstream, ofstream, and fstream. Understand reading, writing, appending, file modes, examples, common mistakes, best practices, and FAQs.

Open lesson

Lesson 26

Math Library

Learn Math Library in C++ with <cmath> functions, syntax, examples, common mistakes, best practices, and FAQs for beginners.

Open lesson

Lesson 27

Function Overloading

Learn Function Overloading in C++ with syntax, rules, examples, common mistakes, best practices, and FAQs for beginners.

Open lesson

Lesson 58

Advanced Pointers

Learn Advanced Pointers in C++ with clear explanations, practical examples, common mistakes, best practices, and real-world applications.

Open lesson

Lesson 59

Recursion

Learn Recursion in C++ with simple explanations, syntax, examples, common mistakes, best practices, and real-world use cases.

Open lesson

Lesson 60

Enums and Typedef

Learn Enums and Typedef in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 61

Preprocessor Directives

Learn Preprocessor Directives in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Classes & OOP

Classes, object lifetime, inheritance, polymorphism, exceptions, and namespaces.

Templates & Generic Programming

Build reusable, type-safe code with templates and generic programming concepts.

Advanced

STL Containers

Vectors, sets, maps, queues, stacks, and the containers you will use most often.

Lesson 36

Vector

Learn STL Vector in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 37

Set

Learn STL Set in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 38

Map

Learn STL Map in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 39

Unordered Set

Learn Unordered Set in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 40

Unordered Map

Learn Unordered Map in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 41

List

Learn STL List in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 42

Deque

Learn STL Deque in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 43

Queue

Learn STL Queue in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 44

Stack

Learn STL Stack in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

Lesson 45

Priority Queue

Learn Priority Queue in C++ with beginner-friendly explanations, syntax, operations, fully commented examples, common mistakes, best practices, FAQs, and real-world use cases.

Open lesson

STL Algorithms & Performance

Fast I/O, iterators, algorithms, and the performance habits that matter in practice.

Modern C++ Features

Smart pointers, move semantics, lambdas, and the standards that shaped modern C++.

Debugging, Systems & Concurrency

Threads, debugging, build tooling, and the reliability issues you have to handle.

Lesson 55

Multithreading (part 1)

Learn Multithreading Basics in C++ with simple explanations, std::thread examples, thread lifecycle, and fully commented code examples for beginners.

Open lesson

Lesson 56

Multithreading (part 2)

Learn how threads communicate in C++, including passing arguments, race conditions, mutexes, lock_guard, and deadlocks, with fully commented code examples.

Open lesson

Lesson 57

Multithreading (part 3)

Learn advanced multithreading tools in C++ including condition variables, atomic variables, the producer-consumer pattern, common mistakes, best practices, and a handy cheat sheet.

Open lesson

Lesson 62

Debugging with GDB

Learn Debugging with GDB in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 63

Segfault Debugging

Learn Segfault Debugging Walkthrough in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 64

Memory Leak Detection

Learn Memory Leak Detection in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 65

Dangling Pointers

Learn Dangling Pointers in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 66

Makefiles

Learn Makefiles in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson

Lesson 67

Undefined Behavior

Learn Undefined Behavior in C++ with simple explanations, syntax, examples, best practices, common mistakes, and real-world use cases.

Open lesson