#include<iostream>
using namespace std;
class Base{
private:
int x, y;
const int p;
public:
Base(int m, int n, int d):p(d) //通过初始化列表来获得初值
{x=m; y=n;}
void show();
void show() const;
};
void Base::show()
{cout<<x<<", "<<y<<"p="<<p<<endl;}
void Base::show const
{cout<<x<<", "<<y<<"const p="<<p<<endl;}
void main(){
Base a(1, 2, 3);
const Base b(2, 1, 4);
b.show();
a.show();
}