[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 공부/C++ 프로그래밍 2022.04.20
[C++] 명품 C++ 프로그래밍 4장 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 공부/C++ 프로그래밍 2022.04.11
[C++] 명품 C++ 프로그래밍 3장 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 공부/C++ 프로그래밍 2022.04.11
[C++] 명품 C++ 프로그래밍 2장 1번 #include using namespace std; int main(){ for(int i = 1; i 공부/C++ 프로그래밍 2022.04.10