#include "stdafx.h"
#include <iostream>
using namespace std;
class Member
{
public:
int m_ix;
Member(int ix):m_ix(ix)
{
}
protected:
private:
};
class withMember
{
public:
int y;
Member m;
withMember(int a,int b):m(a),y(b){}
//如果没有在初始化列表中对成员对象进行初始化,
//编译器会调用成员对象的默认构造函数。如果该对象没有构造默认构造函数,编译报错!
//多个成员对象,按照声明的顺序初始化!
protected:
private:
};