#include<windows.h>
#include
using namespace std;
class M{
public:
M(){ cout <<FUNCTION<< endl; }
};
class N{
public:
N(){ cout << __FUNCTION__ << endl; }
};
class A{
public:
A(){ cout << __FUNCTION__ << endl; }
};
class B:public A{
public:
B(){cout << __FUNCTION__ << endl;}
private:
M m1;
M m2;
static N ms;
};
N B::ms;
int main(){
//子类调用父类构造函数 的顺序
//静态类成员 父类成员 非静态成员 子类自己
//静态类成员 只调用一次
B b;
cout << "--------------------------" << "\n";
B b2;
system("pause");
return 0;
}