#include<bits/stdc++.h>
using namespace std;
/**
* 常量成员,引用成员,类对象,派生类构造函数对基类构造函数的调用,必须使用初始化列表
* */
class A {
int x, y;
const int i, j;
int &k;
public:
A(int a, int b, int &c): i(a), j(b), k(c), x(a){
y = x;
printf("x = %d y = %d i = %d j = %d k = %d\n", x, y, i, j, k);
k = 10000;
}
};
int main() {
int m = 6;
A a(1, 2, m);
cout<<"m="<<m<<endl;
return 0;
}