πŸ’» Dev & CSC++ Programming

C++ Programming Ch.11 Exercise 9 Solution

Problem: λ‹€μŒμ€ Phone ν΄λž˜μŠ€μ΄λ‹€. 1 2 3 4 5 6 7 8 9 10 11 class Phone { // μ „ν™” 번호λ₯Ό ν‘œν˜„ν•˜λŠ” 클래슀 string name; string telnum; string address; public: Phone(string name="", string telnum="", string address="") { this->name = name; this->telnum = telnum; this->address = address; } }; Phone 클래슀의 객체λ₯Ό μž…μΆœλ ₯ν•˜λŠ” μ•„λž˜ μ½”λ“œμ™€ Execution Resultλ₯Ό μ°Έμ‘°ν•˜μ—¬ <<, >> μ—°μ‚°μžλ₯Ό μž‘μ„±ν•˜κ³  Phone 클래슀λ₯Ό μˆ˜μ •ν•˜λŠ” λ“± ν”„λ‘œκ·Έλž¨μ„ μ™„μ„±ν•˜λΌ. 1 2 3 Phone girl, boy; cin >> girl >> boy; cout << girl << endl << boy << endl; Execution Result: ...

April 2, 2020 Β· 2 min Β· Sobamemil