과제모음 (122) 썸네일형 리스트형 [C++]Inheritance(상속2) ===========================================================>>Date.hProduct.hmain.cppDate.cppProduct.cpp [C++]Inheritance(상속) [[연습문제 1]] >>Human.hStudent.hmain.cppHuman.cppStudent.cpp [C++]복사생성자2 [[확인문제 1]] >>Address.hmain.cppAddress.cppaddress = new char[strlen(add.address)+1]; strcpy(address, add.address); cout [C++]복사생성자 >>연습문제 1 [C++]Const & this & Static 변수 >>Student.hmain.cpp [C++]상수(Const) [[연습문제 1]] >>Date.hmain.cpp [C++]소멸자2(Destructor) >>Rand.hmain.cpp>Rand.cpp [C++]소멸자(Destructor) [[연습문제 1]] #include using std::cin; using std::cout; using std::endl; class DynamicArray{ public: DynamicArray(int _n); ~DynamicArray(); void Arrayinput(); void Arrayoutput(); private: int *p; int array; int i; }; int main() { int n; cout > n; DynamicArray da(n); da.Arrayinput(); da.Arrayoutput(); return 0; } DynamicArray::DynamicArray(int _n) { array = _n; p = new int[array]; cout 이전 1 ··· 7 8 9 10 11 12 13 ··· 16 다음