Tagged articles
2 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Aug 21, 2025 · Fundamentals

How to Eliminate C/C++ Header File Circular Includes and Speed Up Compilation

This article explains why circular header inclusion in C/C++ causes compilation errors and performance issues, and provides practical solutions such as include guards, #pragma once, forward declarations, better file organization, and the PIMPL pattern, along with real‑world examples and interview‑style Q&A.

#pragma onceCcircular inclusion
0 likes · 24 min read
How to Eliminate C/C++ Header File Circular Includes and Speed Up Compilation
Alibaba Cloud Developer
Alibaba Cloud Developer
Sep 2, 2020 · Fundamentals

Mastering C++ Interfaces: Zero‑Overhead Techniques and Practical Patterns

This article explores various ways to implement interfaces in C++, comparing virtual functions, the Pimpl idiom, hidden subclasses, callback mechanisms, function pointers, std::function, member function pointers, and non‑intrusive traits, highlighting their trade‑offs in performance, binary compatibility, and design flexibility.

CInterfacecallback
0 likes · 13 min read
Mastering C++ Interfaces: Zero‑Overhead Techniques and Practical Patterns