πŸ’» Dev & CSC++ Programming

C++ Programming Ch.7 Exercise 1 Solution

Problem: 1번 ~ 4번 λ¬Έμ œκΉŒμ§€ μ‚¬μš©λ  Book ν΄λž˜μŠ€λŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Book{ string title; int price, pages; public: Book(string title="", int price=0, int pages=0){ this->title = title; this->price = price; this->pages = pages; } void show() { cout << title << " " << price << "원 " << pages << " νŽ˜μ΄μ§€" << endl; } string getTitle() { return title; } }; Book 객체에 λŒ€ν•΄ λ‹€μŒ 연산을 ν•˜κ³ μž ν•œλ‹€. ...

March 6, 2020 Β· 3 min Β· Sobamemil