08 2021 档案
摘要:Consider: class Date { }; // for dates in time class Customer { public: //... // as before private: std::string name; Date lastTransaction; }; class P
阅读全文
摘要:An assignment to self occurs when an object is assigned to itself: class Widget { ... }; Widget w; //... w = w; // assignment to self If you try to ma
阅读全文
摘要:For this code: int x, y, z; x = y = z = 15; // chain of assignments The way this is implemented is that assignment returns a reference to its left-han
阅读全文
摘要:If Transaction had multiple constructors, each of which had to perform some of the same work, it would be good software engineering to avoid code repl
阅读全文
摘要:Destructors should never emit exceptions. If functions called in a destructor may throw, the destructor should catch any exceptions, then swallow them
阅读全文
摘要:If a class does not contain virtual functions, that often indicates it is not meant to be used as a base class. When a class is not intended to be a b
阅读全文
摘要:To disallow functionality automatically provided by compilers: 1. declare the corresponding member functions private and give no implementations. clas
阅读全文
摘要:PAR (Pixel Aspect Ratio),像素的宽高比 大多数情况像素宽高比为1:1,也就是一个正方形像素,如果不是1:1, 则可以理解为长方形像素。常用的PAR比率有(1:1,10:11, 40:33, 16:11, 12:11 )。 DAR (Display Aspect Ratio),
阅读全文

浙公网安备 33010602011771号