C++ Programming Ch.6 Exercise 2 Solution
Problem: Person 클래스의 객체를 생성하는 main() 함수는 다음과 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Person { int id; double weight; string name; public: void show() { cout << id << ' ' << weight << ' ' << name << endl; } }; int main() { Person grace, ashley(2, "Ashley"), helen(3, "Helen", 32.5); grace.show(); ashley.show(); helen.show(); } (1) 생성자를 중복 작성하고 프로그램을 완성하라. ...