摘要:
13. 静态对象 13.1 Static in C++ Two basic meanings: Static storage allocated once at a fixed address Visibility of a name internal linkage Don't use stati 阅读全文
posted @ 2022-06-16 18:03
小a的软件思考
阅读(90)
评论(0)
推荐(0)
摘要:
12 拷贝构造 Create a new object from an existing one For example, when calling a function // Currency as pass-by-value argument void func(Currency p) { co 阅读全文
posted @ 2022-06-16 16:26
小a的软件思考
阅读(38)
评论(0)
推荐(0)
摘要:
11. 多态 11.1 Conversions Public Inheritance should imply substitution If B isa A, you can use a B anywhere an A can be used. 示例: #include <iostream> us 阅读全文
posted @ 2022-06-16 14:11
小a的软件思考
阅读(39)
评论(0)
推荐(0)
摘要:
10. 引用 References are a new data type in C++; Local or global variables For ordinary variables, the initial value is required In parameter lists and m 阅读全文
posted @ 2022-06-16 09:25
小a的软件思考
阅读(72)
评论(0)
推荐(0)