上一页 1 2 3 4 5 6 ··· 23 下一页
摘要: For example, suppose you'd like to write a template for fixed-size square matrices that, among other things, support matrix inversion. template<typena 阅读全文
posted @ 2022-03-01 11:17 MyCPlusPlus 阅读(41) 评论(0) 推荐(0) 编辑
摘要: Open as administrator the "x64 Native Tools Command Prompt for VS 2017" run: devenv and then open your project, add a new resource. 阅读全文
posted @ 2022-02-11 10:00 MyCPlusPlus 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Suppose we need to write an application that can send messages to several different companies. Messages can be sent in either encrypted or cleartext ( 阅读全文
posted @ 2021-12-10 18:26 MyCPlusPlus 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Question: what is the difference between class and typename in the following template declarations? template<class T> class Widget; // uses "class" te 阅读全文
posted @ 2021-12-10 11:17 MyCPlusPlus 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Look what happens when we turn doProcessing from a function into a function template: void doProcessing(Widget& w) { if (w.size() > 10 && w != someNas 阅读全文
posted @ 2021-12-09 10:04 MyCPlusPlus 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Multiple inheritance just means inheriting from more than one base class, but it is not uncommon for MI to be found in hierarchies that have higher-le 阅读全文
posted @ 2021-12-07 17:17 MyCPlusPlus 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Item 32 demonstrates that C++ treats public inheritance as an is-a relationship. It does this by showing that compilers, when given a hierarchy in whi 阅读全文
posted @ 2021-12-03 18:04 MyCPlusPlus 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Item 32 explains that public inheritance means "is-a." Composition has a meaning, too. Actually, it has two meanings. Composition means either "has-a" 阅读全文
posted @ 2021-12-03 18:03 MyCPlusPlus 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1. 赋值运算符的辨析: = 基本的赋值:= 覆盖之前的值?= 如果没有被赋值过,就赋予等号后面的值+= 添加等号后面的值 注意: make会将整个 makefile 展开后,再决定变量的值,例如: x = foo y = $(x) bar x = xyz 这个例子中,y的值将会是 xyz bar  阅读全文
posted @ 2021-12-02 16:33 MyCPlusPlus 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Virtual functions are dynamically bound, but default parameter values are statically bound. An object’s static type is the type you declare it to have 阅读全文
posted @ 2021-09-29 09:34 MyCPlusPlus 阅读(75) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 23 下一页