C++
23 articles in this topic

C++ Compiler Warnings and Sanitizers: Catch Bugs Early
Build a practical C++ safety net with strict warnings and sanitizer runs. Three small programs show how to find, explain and fix defects before they spread.

C++ Arrays vs std::array vs std::span: Choose the Right Interface
Run the same five integers through raw-array, std::array and std::span interfaces, then choose from their ownership, size and lifetime contracts.

C++ Classes and Objects MCQs: 11 Solved Questions on Members, Pointers and Inheritance
Work through 11 C++ classes and objects MCQs, then use the fresh explanations and fixed examples to repair mistakes in access, lifetime and inheritance rules.

C++20 Modules: Interface Units, Imports and Build Order with a Worked Library Split
Follow one small C++20 module from its exported interface through a hidden implementation and importing client. Trace the result and build dependency graph.

File Handling in C++: Read, Write, Append and Seek with Examples
Learn how C++ file streams work through connected text and binary examples, from safe record parsing to appending data and updating a fixed record.

Arrays in C++: Sequential Storage, Indexing and Worked Examples
Build one C++ array from declaration to traversal, updates, memory addresses, fixed-capacity insertion and deletion, then extend the model to two dimensions.

C++ Move Semantics Tutorial: Trace Ownership with Runnable Examples
Follow one heap allocation through copy and move operations, then learn how value categories, special members, copy elision, and noexcept affect real C++ code.

Exception Handling in C++: try, catch, throw and two runnable examples
Follow two runnable programs to see how C++ exceptions change control flow, select handlers and destroy local objects during stack unwinding.

C++ Variables, Scope and Namespaces: Trace Name Lookup Across Three Files
Trace one C++ program across a header and two source files to see exactly how declaration, initialisation, scope, namespaces, lifetime and linkage differ.

C++ auto and decltype: Trace Every Deduced Type
Trace what C++ actually deduces when auto, references, const, decltype, and decltype(auto) interact, then confirm each result at compile time.

Lambda Expressions in C++: Syntax, Captures and Worked Examples
Learn how C++ lambdas store captured state, accept parameters and work with STL algorithms. Follow each example from creation to exact output.

Algorithms Header in C++: Sort, Search and Transform with Runnable Examples
Learn the iterator-range model behind C++ standard algorithms through complete programs for sorting, searching, transforming and erase-remove.