home / c++
💡

C++

C++ programming tutorials and lessons — from basics to advanced topics like templates, smart pointers, and concurrency.

64 posts // c++ updated daily
C++ Function Templates generic programming tutorial

C++ Function Templates: Generic Programming from Scratch

Learn C++ function templates — type deduction, specialization, non-type parameters, SFINAE, and constexpr templates. Foundation of generic programming.

C++ Smart Pointers unique shared weak ptr guide

C++ Smart Pointers: unique_ptr, shared_ptr & weak_ptr Explained

Master C++ smart pointers — unique_ptr for exclusive ownership, shared_ptr for shared ownership, weak_ptr for breaking cycles. Modern memory management…

C++ Dynamic Memory new delete tutorial

C++ Dynamic Memory: new, delete & Why RAII Exists

Master C++ dynamic memory allocation with new and delete. Learn heap vs stack, memory leaks, dangling pointers, and why RAII…

C++ Type Casting static dynamic const reinterpret cast

C++ Type Casting: static_cast, dynamic_cast, const_cast & reinterpret_cast Guide

Master all four C++ cast operators. Learn static_cast, dynamic_cast, const_cast, reinterpret_cast, std::bit_cast, and when to use each one.

C++ References lvalue rvalue tutorial

C++ References: Lvalue, Rvalue & const Reference Complete Guide

Master C++ references including lvalue references, rvalue references, const references, reference collapsing, and when to use references vs pointers.

C++ Pointers memory addresses tutorial

C++ Pointers: Complete Guide to Memory Addresses, Arithmetic & Safety

Master C++ pointers from scratch. Learn pointer declaration, arithmetic, arrays, function pointers, const correctness, common bugs, and modern best practices.

C++ Header Files Compilation Model tutorial

C++ Header Files & Compilation Model: ODR, Include Guards & Linking

Master C++ header files and the compilation model. Learn include guards, ODR, forward declarations, precompiled headers, and multi-file project organization.

C++ Preprocessor Macros define include tutorial

C++ Preprocessor & Macros: Complete Guide to #define, #include & Conditionals

Master C++ preprocessor directives and macros. Learn #define, #include, conditional compilation, predefined macros, and when to use modern alternatives.

C++ Error Handling Strategies Best Practices Guide

C++ Error-Handling Strategies: optional, expected & More

Compare C++ error-handling strategies — return codes, std::optional, std::expected, error_code, and exceptions. Learn when to use each with practical examples.