uacs2024

导航

2024年3月8日 #

子类包含父类成员的构造与析构顺序

摘要: 子类包含父类成员的构造与析构顺序 #include <iostream> using namespace std; class F1{ public: F1() {cout << "F1 构造函数" << endl;} ~F1() {cout << "F1 析构函数" << endl;} }; cl 阅读全文

posted @ 2024-03-08 14:45 ᶜʸᵃⁿ 阅读(5) 评论(0) 推荐(0) 编辑

复试C++ 异常 看程序写结果

摘要: 就算每一个case后面都没有break , throw相当于起了break的作用? #include <iostream> #include <stdexcept> using namespace std; class ErrorA: public runtime_error{ public: Er 阅读全文

posted @ 2024-03-08 10:57 ᶜʸᵃⁿ 阅读(6) 评论(0) 推荐(0) 编辑