08 2021 档案

摘要:Consider: class Date { }; // for dates in time class Customer { public: //... // as before private: std::string name; Date lastTransaction; }; class P 阅读全文
posted @ 2021-08-31 10:51 MyCPlusPlus 阅读(59) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-08-31 10:50 MyCPlusPlus 阅读(86) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-08-30 11:22 MyCPlusPlus 阅读(73) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-08-30 11:03 MyCPlusPlus 阅读(94) 评论(0) 推荐(0)
摘要:Destructors should never emit exceptions. If functions called in a destructor may throw, the destructor should catch any exceptions, then swallow them 阅读全文
posted @ 2021-08-28 15:22 MyCPlusPlus 阅读(60) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2021-08-27 10:14 MyCPlusPlus 阅读(78) 评论(0) 推荐(0)
摘要:To disallow functionality automatically provided by compilers: 1. declare the corresponding member functions private and give no implementations. clas 阅读全文
posted @ 2021-08-26 20:11 MyCPlusPlus 阅读(50) 评论(0) 推荐(0)
摘要:PAR (Pixel Aspect Ratio),像素的宽高比 大多数情况像素宽高比为1:1,也就是一个正方形像素,如果不是1:1, 则可以理解为长方形像素。常用的PAR比率有(1:1,10:11, 40:33, 16:11, 12:11 )。 DAR (Display Aspect Ratio), 阅读全文
posted @ 2021-08-14 12:04 MyCPlusPlus 阅读(995) 评论(0) 推荐(0)