/* 3. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. */ #include class Point { int x; int y; public: Point() { x = 1; y = 1; } Point(int t) { x = 2; y = 2; } Point(Point *t) { x = 3; y = 3; } void print() { printf("(%d,%d)\n",x,y); } Point add(Point p, Point q, Point r) { Point t; t.x = x + p.x + q.x + r.x; t.y = y + p.y + q.y + r.y; return t; } }; void main() { int x[5] = { 1, 2, 3, 4, 5 }; // ¿©±â¸¦ ¹Ù²Ü °Í Point a; Point b(&a); Point c(x[2]); Point d(&c); Point e; e = a.add(b,c,d); e.print(); }