摘要: 源程序: #include <iostream> using namespace std; static int glos = 100; void f() { int a = 1; static int fs = 1; cout << "在f中:a(自动)=" << a << " fs(静态)=" 阅读全文
posted @ 2019-12-23 08:41 bobo哥 阅读(149) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream> using namespace std; class samp { public: void setij(int a, int b) { i = a; j = b; } ~samp() { cout << "析构..." << endl; } int 阅读全文
posted @ 2019-12-23 08:36 bobo哥 阅读(221) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream> using namespace std; class A { private: int a, b; public: A(int k = 4, int j = 0) { a = k; b = j; } ~A(); void show(); }; voi 阅读全文
posted @ 2019-12-23 08:32 bobo哥 阅读(119) 评论(0) 推荐(0)