06 2022 档案
摘要:15. 模板(Templates) Reuse source code generic programming use types as parameters in class or function definitions Template functions Template classes 1
阅读全文
摘要:14. 运算符重载 14.1 Overloaded operator Just a function with an operator name! Use the operator keyword as a prefix to name operator *(...) Can be a member
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:9. Const declares a variable to have a constant value Constants are variables Observe(遵守) scoping rules Declared with "const" type modifier 9.1 Compil
阅读全文
摘要:参考链接 Bochs 调试常用命令 部分 Bochs 调试指令 使用 Bochs 调试汇编程序 Using Bochs internal debugger
阅读全文