Array1 배열 구현 #include constexpr int INVALID_INDEX = -1; constexpr int MAX_COUNT = 101; template class MyArray { T Array_[MAX_COUNT]; size_t Size_; public: void Insert(size_t _Index, T _Data) { if (0 == _Index) { Array_[_Index] = _Data; ++Size_; return; } for (size_t i = Size_; i > _Index; --i) { Array_[i] = Array_[i - 1]; } Array_[_Index] = _Data; ++Size_; } void OrderlyRemove(size_t _Index) { for (size_t i .. 2023. 2. 8. 이전 1 다음