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) μμ±μλ₯Ό μ€λ³΅ μμ±νκ³ νλ‘κ·Έλ¨μ μμ±νλΌ. ...