06 2021 档案

摘要: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 阅读全文
posted @ 2021-06-23 10:55 MyCPlusPlus 阅读(55) 评论(0) 推荐(0)
摘要:In a constructor, prefer use of the member initialization list to assignment inside the body of the constructor. List data members in the initializati 阅读全文
posted @ 2021-06-23 10:03 MyCPlusPlus 阅读(75) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-06-22 14:14 MyCPlusPlus 阅读(80) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-06-21 15:17 MyCPlusPlus 阅读(98) 评论(0) 推荐(0)