C++ Programming Ch.11 Exercise 8 Solution
Problem: Circle 클래스는 다음과 같다. 1 2 3 4 5 6 7 8 class Circle { string name; int radius; public: Circle(int radius=1, string name="") { this->radius = radius; this->name = name; } }; Circle 클래스의 객체를 입출력하는 다음 코드와 Execution Result를 참조하여 <<, >> 연산자를 작성하고 Circle 클래스를 수정하는 등 프로그램을 완성하라. 1 2 3 Circle d, w; cin >> d >> w; // 키보드 입력을 받아 객체 d와 w를 완성 cout << d << w << endl; // 객체 d, w 출력 Execution Result: ...