
[C++] 명품 c++ 프로그래밍 5장
1번 #include using namespace std; class Circle { int radius; public: Circle() :Circle(1) {} Circle(int r) { radius = r; } void show() { cout > b; if (bigger(a, b, big)) { cout
1번 #include using namespace std; class Circle { int radius; public: Circle() :Circle(1) {} Circle(int r) { radius = r; } void show() { cout > b; if (bigger(a, b, big)) { cout
1번 #include using namespace std; class Color { int red, green, blue; public: Color(){ red = green = blue = 0; } Color(int r, int g, int b){ red = r; green = g; blue = b; } void setColor(int r, int g, int b){ red = r; green = g; blue = b; } void show(){ cout
1번 #include using namespace std; class Tower{ int height; public: Tower(); Tower(int a); int getHeight(); }; Tower::Tower(){ height = 1; } Tower::Tower(int a){ height = a; } int Tower::getHeight(){ return height; } int main() { Tower myTower; Tower seoulTower(100); cout
1번 #include using namespace std; int main(){ for(int i = 1; i