#include
using namespace std;
class A{
public:
A(int i){
a=i;
}
const int fun1()const{
return a;
}
int fun2(){
return a*a;
}
private:
int a;
};
int main(){
A a1(8);
const int x=a1.fun1();
int y=a1.fun2();
cout<<x<<','<<y<<endl;
const A a2(5);
int x1=a2.fun1();
int y1=a2.fun2();
cout<<x1<<endl;
const A *p1=&a1;
p1=&a2;
*p1=a2;
cout<fun1()<<endl;
A *const p2=&a1;
*p2=a2;
p2=&a2;
cout<fun1()<<endl;
const A * const p3=&a1;
p3=&a2;
*p3=a2;
cout<fun1()<<endl;
}