Masterclass Series · Batch 26

Masterclass in C++ using STL, Qt and Threads

From C++98 class design through C++17 features, template metaprogramming, STL internals, multithreading, and production GUI development with Qt — in one course.

Schedule: Every Sat – Sun
Time: 09:00 AM – 12:00 PM
Starting: 9th May 2026
Duration: 7 Months · ~65 Sessions
Language: Marathi
Pre-Requisite: Intermediate C
Batches Covered: 25
Why This Course

What Makes This C++ Course Different

C++ specific depth you won’t find in the market.

01

vtable, vptr and Object Layout in Memory

You won’t just learn that virtual functions enable polymorphism — you’ll see the vtable structure, the hidden vptr member, the adjustor thunk, and how the runtime resolves calls through base class pointers. Every object is mapped to its actual memory layout.

02

Virtual Memory Mapping of C++ Constructs

We map every C++ construct — classes, objects, static members, virtual functions, templates — to the virtual address space of a running process. Text section, data, BSS, stack, heap, memory-mapped regions. You see where your code actually lives.

03

Template Metaprogramming — Not Just Usage

Beyond function and class templates — you’ll learn traits, policy classes, SFINAE, expression templates, recursive instantiation, partial specialisation, and the compile-time computation model. The full depth of generic programming.

04

Full Standards Coverage: C++98 Through C++17

Not a “modern C++” crash course. We start with C++98 class design, build through C++11 move semantics and variadic templates, cover C++14 generic lambdas, and arrive at C++17 structured bindings, fold expressions, and CTAD. You understand the evolution, not just the latest syntax.

05

Production GUI Development with Qt

Not a toy example. You build real applications — dialogs, main windows with menus and toolbars, custom widgets, layout management, event processing, MDI interfaces. Signals and slots architecture understood at the mechanism level.

06

Threading with the C++ Memory Model

Beyond std::thread basics — you learn the C++ memory model, atomic operations, lock-based and lock-free concurrent data structures, and how to design concurrent code that is correct by construction, not by accident.

Course Progression

How the Course Unfolds

Six phases, each building on the last.

Phase 1: Object-Based Programming

From C’s limitations to C++ classes. Data abstraction, information hiding, constructors, operator overloading, copy control, memory management. The foundation.

Phase 2: Object-Oriented Programming

Inheritance, polymorphism, virtual functions, pure abstract classes, interface inheritance, vtable internals. The design principles that make large systems possible.

Phase 3: Generic Programming

Function templates, class templates, specialisation, traits, policy classes, expression templates, metaprogramming. The compile-time dimension of C++.

Phase 4: Modern C++ (11/14/17)

Move semantics, rvalue references, variadic templates, lambdas, `constexpr`, structured bindings, fold expressions, CTAD. Every feature explained through the type system.

Phase 5: STL & Threads

Sequential and associative containers, iterators, generic algorithms, allocators, streams. Then: threading, synchronisation, atomics, lock-free design.

Phase 6: Qt Framework

Signals and slots, dialogs, main windows, custom widgets, layout management, event processing. Building real desktop applications.

Complete Syllabus

Module-wise Syllabus

This is the full course content across ~65 weekend sessions.

Module 01

Object Model and Memory Architecture

From C’s limitations to C++ class design — constructors, copy control, operator overloading, and every construct mapped to the virtual address space of a running process.

From C to C++: The Motivation

  • Defining custom types in C — client-server separation and modular programming
  • The fundamental limitation: inability of the server side to hide data layout from a client in C
  • Why data hiding is necessary — and its relationship to extendibility
  • The ‘hello world’ program in C++ — build process for single-file and multi-file C++ programs
  • C with Classes: the first version of C++ — the principle of data abstraction and the principle of information hiding

The Class Statement

  • Syntax and access control: the private, public, and protected keywords
  • Defining data members and member functions inside a class
  • Object creation via data definition statements
  • Dynamic object creation with new and deallocation with delete
  • Constructors: the constructor as a callback mechanism; types of constructors: synthesized, default, and parameterized; writing constructors: constructor initialiser list, explicit assignment, and hybrid approaches; function overloading — the One Definition Rule (ODR) — name mangling by the C++ compiler; overload resolution: viable functions, candidate functions, and best match selection; overloaded constructors
  • Member functions and the this pointer — invocation via instance variable and via pointer
  • L-value references: creating an alias for an existing object, naming an anonymous free-store object
  • The static keyword: restricting visibility of global data to a single source file; restricting visibility of a global function to a single source file; making a local variable static to extend its lifetime and maintain state across calls; static data members of a class; static member functions of a class
  • The const keyword: making global and local data const; semantic differences of const between C and C++; const and pointers: pointer to const, const pointer, const pointer to const — use cases for each; the mutable keyword; the inline keyword; the extern keyword

Memory Management

  • Execution environments: bare-metal, OS-hosted, and pre-emptive multitasking with virtual memory
  • Virtual address space of a process: text section, read-only data, data section, BSS, and stack
  • The concept of memory mapping — mapped vs unmapped virtual address space — the heap as unmapped space — what is the “free store” in C++?
  • Mapping a C program onto sections of virtual address space
  • Mapping a C++ class and its objects onto sections of virtual address space
  • Revisiting static and const with the deeper understanding of build process and memory layout

Operator Overloading

  • The concept of operator overloading as a callback mechanism — the operator keyword
  • Unary and binary operators — which operators can and cannot be overloaded
  • Overloading arithmetic and logical operators
  • Overloading pre-increment, post-increment, pre-decrement, and post-decrement operators
  • Overloading the stream insertion (<<) and extraction (>>) operators
  • Overloading the subscript operator ([])
  • Overloading the function call operator (())
  • Overloading the new operator — local and global overloads
  • The semantics of unary vs binary operator overloading
  • Common pitfalls in operator overloading

Copy Control

  • Initialising a new object from an existing object of the same class
  • Assigning one object to another
  • The synthesised copy constructor, synthesised assignment operator, and the destructor
  • The consequence of indirect (pointer or reference) non-static members in a class
  • Pitfall: segmentation fault from double-free or dangling pointer access
  • Pitfall: memory leak from missing deallocation
  • Writing custom copy constructor, assignment operator, and destructor to avoid these pitfalls
  • Implementing deep copying
  • Implementing shallow copying with reference counting

Principles of Class Design

  • Problem space vs implementation space — identifying entities in the problem domain
  • The principles of cohesion and coupling
Module 02

Inheritance, Polymorphism, and Runtime Dispatch

How hierarchical design enables reuse — virtual functions, interface inheritance, pure abstract classes, and the vtable mechanism that makes runtime dispatch possible.

Relationships Between Classes

  • The principle of reusability
  • Class relationships: depends-on, has-a, and is-a
  • Scenario-based case studies designing multiple classes with depends-on and has-a relationships
  • The hierarchical nature of complex systems — general-special relationships between classes
  • Building complex hierarchical systems using general-special class structures

Inheritance

  • Exploring reuse through implementation inheritance — the is-a relationship
  • Base class and derived class — memory layout of a derived class object
  • Writing derived class constructors — calling the base class constructor — the role of the default constructor in the base class
  • The protected access specifier
  • Inheriting member functions — overriding for replacement vs overriding for extension

Polymorphism

  • Storing the address of a derived object in a base class pointer — why the language permits this
  • Virtual functions — overriding and the principle of polymorphism — defining a polymorphic class
  • Resolution of member function calls across combinations: base pointer with base object, derived pointer with derived object, and base pointer with derived object
  • Object slicing — what is lost and why
  • The principle of late binding

Run-Time Type Identification

  • The typeid operator — fetching type names at runtime
  • typeid with polymorphic classes — dynamic type resolution

Interface Inheritance and Abstract Classes

  • Interface inheritance as a superior mechanism for hiding implementation
  • How valuable implementation details leak through header files
  • Pure virtual functions — pure abstract base classes — creating interfaces
  • The inability to instantiate a pure abstract base class
  • Separating interface from implementation using interface inheritance
  • Polymorphism through pure abstract base classes

The vtable and Runtime Dispatch

  • Resolution of calls to virtual and pure-virtual functions from a base class pointer
  • The vtable structure and the adjustor thunk mechanism
  • Hidden members of an object: the this pointer, the vptr, the vtable, and RTTI data
Module 03

Generic Programming and Template Metaprogramming

From function templates to expression templates — type deduction, specialisation, traits, policy classes, and compile-time computation through recursive instantiation.

Foundations of Generic Programming

  • The motivation for generic algorithms — the tension between type safety and genericity
  • Prior approaches: macros and void* — their limitations
  • C++ function templates — implementing standalone generic algorithms
  • Container types — implementing generic data structures using class templates

Template Mechanics

  • Template argument deduction in function templates
  • Template parameters — overloading function templates
  • Specialisation of class templates — partial specialisation — default template arguments
  • Non-type template parameters for classes and functions — restrictions on non-type parameters
  • The typename keyword — member templates — template-template parameters — zero initialisation
  • Using string literals as arguments for function templates

Template Compilation and Instantiation

  • Template models: inclusion model, explicit instantiation, separation model
  • Templates and inline functions — precompiled headers — debugging templates
  • Declaration vs definition — the One Definition Rule for templates
  • Template argument vs template parameter
  • Instantiation modes: on-demand, lazy, and explicit — the C++ instantiation model
  • The deduction process: deduced context, special deduction situations, implicit conversions, default call arguments

Advanced Template Techniques

  • Templates and polymorphism: dynamic polymorphism vs static polymorphism
  • Traits and policy classes — type functions — policy traits
  • Templates and inheritance — named template arguments — empty base class optimisation — parameterized virtuality
  • Template metaprogramming: enumerations vs static constants — induction variables — recursive instantiation vs recursive template arguments
  • Expression templates — temporaries and split loops — encoding expressions in template arguments
  • Type classification — smart pointers — tuples — function objects and callbacks
Module 04

The C++ Type System: Casting and Runtime Identification

Implicit conversions, the four named casts, and how RTTI interacts with inheritance hierarchies — understanding what the compiler does and what the runtime resolves.

Implicit Conversions

  • Implicit type conversions in C — widening, narrowing, and their consequences
  • Implicit type conversions in C++ — constructor-based and operator-based conversions

Explicit Casts

  • C-style type casting and its dangers
  • static_cast — compile-time checked conversions between related types
  • dynamic_cast — runtime-checked downcasting in polymorphic hierarchies
  • reinterpret_cast — low-level bit reinterpretation
  • const_cast — adding or removing const qualification

Combining Type Casts with Inheritance

  • Type casting across inheritance hierarchies
  • Combining type casting, RTTI, and inheritance for safe downcasting and cross-casting
Module 05

Exception Safety and Namespace Architecture

Structured error handling from C’s setjmp to C++ exceptions — stack unwinding, exception class hierarchies, and namespace design for large codebases.

Exception Handling

  • The motivation for structured exception handling
  • Exception handling in C: setjmp() and longjmp() — limitations and dangers
  • Exception handling in C++: try, catch, and throw
  • The exception class hierarchy in C++ — multiple catch blocks — catch-all handlers
  • Stack unwinding and its consequences for object lifetime
  • The deprecated auto_ptr and its successors
  • Built-in exceptions — writing user-defined exception classes

Namespaces

  • The One Definition Rule and the problem of global namespace pollution
  • Namespaces as the solution — defining and using namespaces
  • Nested namespaces — the using directive and using declaration
Module 06

C++11: Move Semantics, Smart Pointers, and Modern Idioms

The ownership revolution — rvalue references, move constructors, unique_ptr, shared_ptr, lambdas, auto, constexpr, and the features that redefined how C++ is written.

Move Semantics and Value Categories

  • Move semantics — transferring ownership of resources without copying
  • Rvalue references — distinguishing temporary values from persistent objects
  • Forwarding references (universal references) — perfect forwarding in generic code
  • Special member functions for move semantics — move constructor and move assignment operator
  • Converting constructors — controlling implicit and explicit conversions
  • Explicit conversion functions

Smart Pointers and Ownership

  • std::unique_ptr — exclusive ownership of a dynamically allocated resource, zero overhead over raw pointers
  • std::shared_ptr — shared ownership with reference counting — control block layout and overhead
  • std::weak_ptr — non-owning observer of a shared resource — breaking circular references
  • Ownership transfer — moving unique_ptr between scopes and containers
  • Custom deleters — controlling how a resource is released
  • The relationship between smart pointers and RAII — replacing manual new/delete with ownership semantics

Type Deduction and Compile-Time Computation

  • auto — compiler-deduced variable types
  • decltype — querying the type of an expression
  • Type aliases with using — a modern replacement for typedef
  • constexpr — marking functions and variables for compile-time evaluation
  • static_assert — compile-time assertions for type properties and constraints
  • Trailing return types — specifying return type after the parameter list

Lambda Expressions and Function Objects

  • Lambda expressions — anonymous function objects with capture lists
  • Capture by value, capture by reference, default captures
  • std::function — type-erased callable wrapper for functions, lambdas, and function objects
  • std::bind — partial application and argument reordering for callable objects

Templates and Generics

  • Variadic templates — templates accepting an arbitrary number of arguments
  • Initializer lists — uniform initialisation syntax with std::initializer_list
  • User-defined literals — extending the literal syntax for domain-specific types

Class Design Enhancements

  • Delegating constructors — one constructor calling another
  • Non-static data member initializers — default values at the point of declaration
  • Default functions (= default) — explicitly requesting compiler-generated implementations
  • Deleted functions (= delete) — explicitly preventing copying, assignment, or unwanted overloads
  • Explicit virtual overrides (override) — catching mismatched signatures at compile time
  • The final specifier — preventing further derivation or overriding
  • Ref-qualified member functions — overloading on the value category of *this

Language Modernisation

  • nullptr — a type-safe null pointer constant replacing NULL
  • Strongly-typed enums (enum class) — scoped enumerations with no implicit conversions
  • Attributes — standard annotations for compiler hints
  • Range-based for loops — iterating over containers without explicit iterators
  • Inline namespaces — versioning library APIs without breaking client code
  • Right angle brackets — parsing >> correctly in nested template arguments
  • The noexcept specifier — declaring that a function does not throw exceptions
Module 07

C++14: Refined Generics and Relaxed constexpr

Generic lambdas, return type deduction, decltype(auto), and the relaxation of constexpr — small changes with disproportionate impact on real-world code.

Refinements to C++11

  • Binary literals — expressing integer constants in binary notation
  • Generic lambda expressions — lambdas with auto parameters
  • Lambda capture initializers — creating new captured variables at the point of capture
  • Return type deduction — omitting the return type for functions with deducible returns
  • decltype(auto) — preserving the exact type and value category of an expression
  • Relaxed constraints on constexpr functions — loops, branches, and local variables in constexpr
  • Variable templates — parameterizing variables on types
Module 08

C++17: Structured Bindings, Compile-Time Branching, and Vocabulary Types

if constexpr, CTAD, fold expressions, std::optional, std::variant, std::string_view — the features that make modern C++ expressive without sacrificing type safety.

Structured Bindings and Control Flow

  • Structured bindings — decomposing aggregates, pairs, and tuples into named variables
  • if constexpr — compile-time branching that discards the untaken path entirely
  • Selection statements with initializers — if(init; cond) and switch(init; cond)
  • Sequenced order-of-evaluation rules — eliminating a class of undefined behaviour

Templates and Compile-Time Enhancements

  • Class Template Argument Deduction (CTAD) — deducing template arguments from constructor calls
  • Non-type template parameters with auto — deduced non-type parameters
  • Fold expressions — applying binary operators across variadic template parameter packs
  • Inline variables — defining constexpr/const data in headers without violating the One Definition Rule

Language Conveniences

  • Nested namespace definitions — namespace a::b::c {}
  • constexpr lambdas and capture of *this by value
  • Guaranteed copy elision and temporary materialisation
  • Standard attributes: [[fallthrough]], [[nodiscard]], [[maybe_unused]]

Vocabulary Types

  • std::optional — nullable value types without resorting to pointers or sentinel values
  • std::variant — type-safe discriminated union replacing raw unions and the visitor pattern
  • std::any — type-safe alternative to void* for holding values of arbitrary type
  • std::string_view — non-owning reference to a character sequence, avoiding unnecessary copies
Module 09

The Standard Template Library: Containers, Algorithms, and Allocators

Sequential, associative, and unordered containers — iterator architecture, generic algorithms, streams, and the allocator model that controls how memory is managed underneath.

Fundamentals and Architecture

  • The std namespace — header file organisation — error and exception handling strategy
  • The STL architecture: containers, iterators, algorithms, and allocators — how they compose
  • Function objects — using functions and functors as algorithm arguments
  • Requirements for container element types

Utilities

  • Pairs and make_pair()
  • The auto_ptr class and its modern replacements
  • Auxiliary functions and supplementary comparison operators

Sequential Containers

  • std::array — fixed-size contiguous container
  • std::vector — dynamic contiguous storage with amortised growth
  • std::deque — double-ended queue with O(1) insertion at both ends
  • std::list — doubly-linked list with O(1) splice and insertion
  • std::forward_list — singly-linked list optimised for minimal overhead
  • std::string — the full interface for string manipulation
  • Container adaptors: std::stack and std::queue
  • All operations covered for each container type

Associative Containers

  • std::map — ordered key-value pairs with unique keys
  • std::multimap — ordered key-value pairs allowing duplicate keys
  • std::set — ordered unique elements
  • std::multiset — ordered elements allowing duplicates
  • All operations covered for each container type

Unordered Containers

  • std::unordered_map — hash-based key-value pairs with O(1) average lookup
  • std::unordered_set — hash-based unique elements with O(1) average lookup
  • std::unordered_multimap and std::unordered_multiset — hash-based containers allowing duplicates
  • Hash functions, bucket interface, load factor, and rehashing
  • Writing custom hash functions for user-defined types

Iterators

  • Iterator categories: forward, bidirectional, and random-access
  • Read-write and const iterators — reverse iterators
  • Insert iterators: back inserter, front inserter, and general inserter

Generic Algorithms

  • Non-modifying algorithms — searching, counting, comparing
  • Modifying algorithms — copying, transforming, replacing
  • Removing algorithms — erase-remove idiom
  • Mutating algorithms — reversing, rotating, shuffling, partitioning
  • Sorting algorithms — full and partial sorts, nth_element, stable sort
  • Sorted-range algorithms — binary search, merge, set operations
  • Numeric algorithms — accumulate, inner product, partial sums

Streams

  • In-depth coverage of iostream — formatted and unformatted I/O
  • File streams with fstream — reading and writing files
  • String streams with stringstream — in-memory formatting and parsing

Allocators

  • Using allocators as application programmers
  • Using allocators as library programmers
  • The default allocator — writing a user-defined allocator — the allocator interface in detail
Module 10

Concurrency: The Memory Model, Atomics, and Lock-Free Design

Beyond std::thread — the C++ memory model, happens-before relationships, atomic operations, and designing concurrent data structures that are correct by construction.

Foundations

  • Multithreading and concurrency — the distinction between parallelism and concurrency
  • Threading models: POSIX threads and Windows threads
  • Managing thread lifecycle — creation, joining, detaching

Shared Data and Synchronisation

  • Sharing data between threads — the risks of unsynchronised access
  • Synchronising concurrent operations — mutexes, locks, condition variables
  • The C++ memory model — happens-before relationships and memory ordering
  • Operations on atomic types — lock-free programming primitives

Concurrent Data Structure Design

  • Designing lock-based concurrent data structures
  • Designing lock-free concurrent data structures
  • Designing concurrent code — partitioning work, avoiding contention
  • Advanced thread management — thread pools and task-based concurrency
Module 11

Production GUI Development with Qt

Signals and slots, dialogs, main windows, custom widgets, layout management, and event processing — building real desktop applications, not toy examples.

Getting Started

  • Hello, Qt World — the minimal Qt application
  • Making connections: the signals and slots mechanism
  • Laying out widgets — basic spatial arrangement

Creating Dialogs

  • Subclassing QDialog — building custom dialog windows
  • Signals and slots in depth — connection types, lifetime management
  • Rapid dialog design using Qt Designer
  • Shape-changing dialogs — adaptive layouts based on user choices
  • Dynamic dialogs — constructing UI elements at runtime
  • Built-in widget and dialog classes — the standard library of UI components

Creating Main Windows

  • Subclassing QMainWindow — the central application window
  • Creating menus and toolbars — actions, shortcuts, and icons
  • Setting up a status bar
  • Implementing the File menu — new, open, save, save-as, recent files
  • Using dialogs within the main window — modal and modeless interaction
  • Storing and restoring application settings
  • Multiple document support
  • Splash screens

Custom Widgets

  • Customising existing Qt widgets — overriding painting and behaviour
  • Subclassing QWidget — building widgets from scratch

Layout Management

  • Laying out widgets on a form — horizontal, vertical, and grid layouts
  • Stacked layouts — switching between multiple views
  • Splitters — user-resizable layout regions

Event Processing

  • Reimplementing event handlers — mouse, keyboard, paint, resize, and custom events
  • Installing event filters — intercepting events before they reach their target
Design Patterns

20 Patterns Across the Course

This course does not teach design patterns as an isolated academic exercise. Instead, patterns emerge naturally from the material — some are built from scratch as part of learning the underlying mechanisms, others are encountered through the libraries and frameworks you use. Both deepen your understanding of software design.

12
Patterns Built from Scratch
You implement the mechanism yourself.

Singleton

Restricting a class to a single instance — controlling global access through a static interface.

Class Factory

Encapsulating object creation — decoupling the client from the concrete class being instantiated.

Function Factory

Returning callable objects configured at creation time — producing specialised behaviour on demand.

Facade

Providing a simplified interface to a complex subsystem — hiding internal complexity from the client.

Iterator

Sequential access to elements of an aggregate without exposing the underlying representation.

RAII

Tying resource lifetime to object lifetime — the defining C++ idiom. Built through copy control, destructors, and smart pointer understanding.

Handle-Body (Bridge)

Shallow copying with reference counting — multiple handles sharing one implementation body. Built from scratch in the copy control section.

Prototype

Creating new objects by cloning existing ones — implemented through deep copy constructors you write yourself.

Template Method

Defining an algorithm skeleton in a base class with virtual hooks that derived classes `override` — built through the “`override` for extension” pattern.

PIMPL

Pointer to Implementation — hiding implementation details from header files. Built through interface inheritance and information-hiding exercises.

Policy-Based Design

Configuring class behaviour through template parameters — traits and policy classes implemented from scratch in the templates module.

CRTP

The Curiously Recurring Template Pattern — static polymorphism through class Derived : `public` Base<Derived>. Built in the parameterized virtuality section.

8
Patterns Encountered Through Library Usage
You use the pattern through STL, Qt, and modern C++ facilities.

Observer

Qt’s signals and slots — one object emits a signal, multiple connected objects respond. The mechanism is used, not reimplemented.

Strategy

Passing lambdas, function objects, and comparators to STL algorithms — changing an algorithm’s behaviour at runtime through a callable.

Command

Encapsulating a callable as a storable, passable object — encountered through `std::function` and std::bind.

Adapter

`std::stack` and `std::queue` — the STL literally calls them container adaptors. They wrap an underlying container and restrict the interface.

Proxy

Smart pointers control access to a raw resource, intercept operations, and manage lifetime on the client’s behalf.

Visitor

`std::variant` with `std::visit` in C++17 — the visitor pattern implemented through the type system.

Composite

Qt’s widget hierarchy — parent widgets containing child widgets, each responding to the same interface for painting, resizing, and event handling.

Type Erasure

`std::function` and `std::any` — hiding concrete types behind a uniform runtime interface.

Pre-Requisite: Intermediate C

You should be comfortable with the following topics in C before joining this course. These are not taught in the course — they are assumed.

01
Data Definition StatementsCreating variables of all built-in types
02
Branching and Loopingif, `if-else`, `if-else` `if-else`, switch, for, while, do-while, break, continue, nested loops
03
FunctionsDeclaration, definition, call, pass by value, pass by reference
04
User-Defined TypesDefining and using structures
05
ArraysArrays of built-in types, arrays of structures
06
Composite AccessArray as a member of structure — dereference, dot, arrow, and subscript operators
07
Stack Memory AllocationMemory allocation using data definition statements
08
Heap Memory AllocationMemory allocation using `malloc()`, `calloc()`, `realloc()`
09
PointersRequired pointer understanding for stack and heap allocation (items 07 and 08)
Strongly recommended: Complete the Advanced C Pointer Workshop on our YouTube channel before joining. It covers the exact pointer foundations this course assumes.

Ready to Master C++?

Batch 26 starts 9th May 2026. First week is open for all.

₹11,800 (₹10,000 + ₹1,800 GST)
Register Now