#include <iostream>
using namespace std;
class t
{
public:
t(){cout<<"t"<<endl;}
void send(){cout<<"send"<<endl;}
};
class A
{
public:
A(){tt.send();}
static t tt;
};
A a;
t A::tt;
void main()
{
}
为什么会出到
send
t
的输出结果 不解
...全文
12511打赏收藏
c++ 静态成员初始问题
#include using namespace std; class t { public: t(){cout<<"t"<<endl;} void send(){cout<<"send"<<endl;} }; class A { public: A(){tt.send();} static t tt; }; A a; t A::tt; void main() { } 为什么会出到 send t 的输出结果 不解