摘要: //program 12.6.2.cpp 封闭类的结构函数和析构函数的调用顺序. #include <iostream> using namespace std; class CTyre { public: CTyre() { cout << "CTyre constructor" << endl; 阅读全文
posted @ 2024-02-07 18:19 xuchaoxin1375 阅读(18) 评论(0) 推荐(0)
摘要: //program 12.6.1.cpp 封闭类 #include <iostream> using namespace std; class CTyre //轮胎类 { private: int radius; //半径 int width; //宽度 public: /*非封闭类也可以使用 初始 阅读全文
posted @ 2024-02-07 18:19 xuchaoxin1375 阅读(51) 评论(0) 推荐(0)