settergetter1 C++ powerC++ p404 LAB box 클래스 setter getter 함수 #include #include using namespace std; class Box {private:int width, length, height;int v;public:void setwidth(int w);int getwidth(); //접근자void setlength(int l);int getlength(); //접근자void setheight(int h);int getheight(); //접근자 int getVolume();void get_input();void print();}; void Box::setwidth(int w){width = w;}int Box::getwidth(){return width;}void Box::setlength(int l){length = l;}int Box::ge.. 2019. 1. 9. 이전 1 다음