05 2022 档案
摘要:安装 sudo apt-get install build-essential module-assistant sudo apt-get install gcc-multilib g++-multilib 编译 gcc -m32 hello.c 参考资料: gcc 编译 32 位程序
阅读全文
摘要:7. Composition(组合) Composition: construct new object with existing objects. It is the relationship of "has-a". Ways of inclusion: Fully By reference 示
阅读全文
摘要:5. Constructor(构造函数) If a class has a constructor, the compiler automatically calls that constructor at the point an object is created, before client
阅读全文
摘要:4. 成员变量 4.1 Fields, parameters, local variables All three kinds of variable are able to store a value that is appropriate to their defined type. 4.1.1
阅读全文
摘要:3. 自动售票机例子 TicketMachine.h #ifndef TICKETMACHINE_H_ #define TICKETMACHINE_H_ class TicketMachine { public: TicketMachine(); virtual ~TicketMachine();
阅读全文
摘要:1,第一个 C++ 程序 编译方式:g++ main.cpp 1.1 输出 main.cpp #include <iostream> using namespace std; // 输出 int main() { cout << "Hello, World! I am " << 18 << " To
阅读全文