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) ์์ฑ์๋ฅผ ์ค๋ณต ์์ฑํ๊ณ ํ๋ก๊ทธ๋จ์ ์์ฑํ๋ผ. ...