摘要:
To disallow functionality automatically provided by compilers: 1. declare the corresponding member functions private and give no implementations. clas 阅读全文
摘要:
For an enpty class, if you don't declare them yourself, compilers will declare their own versions of a copy constructor, a copy assignment operator, a 阅读全文
摘要:
In a constructor, prefer use of the member initialization list to assignment inside the body of the constructor. List data members in the initializati 阅读全文
摘要:
The following functions take the same parameter type: void f1(const Widget *pw); // f1 takes a pointer to a constant Widget object void f2(Widget cons 阅读全文
摘要:
When you do something like this: #define ASPECT_RATIO 1.653 Because #define may be treated as if it's not part of the language per se. The name you de 阅读全文