Smart Pointer in C++
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.... »
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.
static_cast
static_cast
is the first cast you should attempt to use. It does things like implicit conversions between types (such... »
When considering the accessibility of a local variable’s memory outside its function, it’s useful to draw an analogy to a scenario involving a hotel room and... »