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