πŸ’» Dev & CSC++ Programming

C++ Programming Ch.7 Exercise 4 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; } }; λ‹€μŒ 연산을 톡해 μ±…μ˜ 제λͺ©μ„ 사전 순으둜 λΉ„κ΅ν•˜κ³ μž ν•œλ‹€. ...

March 6, 2020 Β· 2 min Β· Sobamemil