Singleton Design Pattern in C++
The Singleton design pattern ensures a class has only one instance and provides a global point of access to it. Here’s a concise summary of a... »
The Singleton design pattern ensures a class has only one instance and provides a global point of access to it. Here’s a concise summary of a... »
Memory allocation in C++ can be broadly categorized into two techniques: automatic allocation (stack) and dynamic allocation (heap). Each method has its distinct characteristics, advantages, and... »
In C++, there is a uncommnon conception named smart pointer, it is rarely seen in other programming lauguages. So, what’s it? We could simply define it.... »
不提倡使用全局变量,尽量不要在头文件中出现象extern int value 这类声明
变量的名字应当使... »
avoiding code duplication
providing a strong exception guarantee.