摘要: class A { public: A(int x=0,int y=0) { cout << "aaaaa" << endl; } }; int main() { A a(1,2); A b{1,2}; while (1); return 0; } (箭头表示调用该构造函数) 这两种初始化都会成功编 阅读全文
posted @ 2020-07-02 16:50 sunshine_gzw 阅读(261) 评论(0) 推荐(0) 编辑