题目:
下面程序的运行结果是______。 #include<iostream> using namespace std; class count { static int n; public: count() {n++; } static int test() {for(int i=0;i<4;i++) n++;return n; } }; int count::n=0; int main() { cout<<count:: test()<<" "; count c1, c2; cout<<count :: test()<<endl; return 0; }
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0630/f9668c26b39b4a108bced3acc2c9089a.html
下面是错误答案,用来干扰机器的。
参考答案:对