목록분류 전체보기 (318)
printf("ho_tari\n");
#include #include "queue.h" int main() { Queues1; s1.push(100); s1.push(200); s1.push(300); std::cout
#include #include "stack.h" int main() { Stacks1; s1.push(100); s1.push(200); s1.push(300); std::cout
#include #include "array.h" #include "complex.h" int main() { int nums1[] = {1,2,3,4,5}; Arrayarr1(nums1, 5); // template (원하는 형태의 데이터타입 생성) for (int i = 0; i
#include #include "boundArray.h" int main() { BoundArray arr1; //BoundArray arr1(0,10); [0,10) BoundArray arr2(100); // BoundArray arr2(0,100); [0,100) BoundArray arr3(1,11); // index[1,11) for (int i = arr2.lower(); i
#include #include "shape.h" #include "rectangle.h" #include "circle.h" #include void printArea(const Shape *ps) { std::cout
#include #include "shape.h" #include "rectangle.h" #include "circle.h" void printArea(const Shape *ps) { std::cout
#include #include "safeArray.h" #include "array.h" int main() { int nums[] = {1, 2, 3, 4, 5}; //Array arr(nums, 5); SafeArray arr(nums, 5); //arr[5] = 6; // polymorphism Array *pArr = new SafeArray(nums, 5); (*pArr)[5] = 6; // pArr->operator[](5) delete pArr; Array &rArr = arr; return 0; } #ifndef SAFEARRAY_H #define SAFEARRAY_H #include "array.h" class SafeArray : public Array { private: public..