Blog
-
C++ Function Pointer | 'Function Pointer' Guide
C++ function pointer int add(int a, int b) { return a + b; }. Organize from concept to usage with practical examples and code.
-
C++ future and promise | 'Asynchronous' Guide
How std::future and std::promise pass a result between threads in C++, and the difference between this and using std::async directly.
-
C++ GDB: A Practical Debugger Guide
C++ GDB guide: breakpoints, stepping, variables, backtraces, -g builds, core dumps, and multithreaded debugging—with real examples.
-
C++ Generic Lambdas — auto Parameters and Template Lambdas
Generic lambdas in C++14: auto makes operator() a template, C++20 template lambdas, STL patterns, deduction rules, performance, and common pitfalls.
-
C++ GUI | Beginner Guide to the Qt Framework
Qt C++ GUI: QApplication, signals/slots, layouts, custom widgets, menus, and sample apps. Build with qmake or CMake and avoid common pitfalls.
-
C++ Header Files : Declarations, Include Guards, and What
How C++ headers declare APIs while .cpp files define behavior: ODR-safe patterns, include guards, forward declarations, templates, inline functions.
-
C++ Header Guards: #ifndef vs #pragma once, Portability,
Compare #ifndef/#define/#endif with #pragma once, fix redefinition errors, name guard macros safely, break circular includes with forward declarations.
-
C++ Heap Corruption: Double Free, Wrong delete,
Heap corruption in C++: buffer overruns, double delete, delete vs delete[], use-after-free, ASan and Valgrind, and RAII patterns to stay safe.
-
C++ `if constexpr` | Compile-Time Branching in Templates
Use `if constexpr` to discard untaken branches during instantiation—unlike runtime `if`, avoiding ill-formed code in unused branches for templates.
-
C++ if / else / switch: Conditionals, Pitfalls, and switch
Complete guide to C++ conditionals: comparison and logical operators, switch vs if-else, fall-through, [[fallthrough]], floating-point compares, and com...