// ¾ß°£¿ë 3¹ø ¹®Á¦ #include class Point { int x; int *y; public: Point(int a,int b) { x = a; y = &x; *y = b; } void operator=(Point &p) { x = p.x; y = p.y; } void operator+(Point &p) { x = x + p.x; *y = *y + *(p.y); } void operator+(int z) { x = z; *y = z; } void print() { printf("%d %d\n",x,*y); } }; void main() { int data[5] = { 0, 1, 2, 3, 4 }; Point a(data[0],data[1]); Point b(data[2],data[3]); Point &c = a; b = a; a+b; c+data[4]; a.print(); b.print(); c.print(); }