C++ Module 08

STLコンテナと設計思想の探求

コンテナ: データ構造

vector
list
deque
stack

パフォーマンス特性

中間挿入

ランダムアクセス

先頭追加

クラス設計とアルゴリズム

template <typename T>

class MutantStack : public std::stack<T> {

public:

typedef typename std::stack<T>::container_type::iterator iterator;


iterator begin() { return this->c.begin(); }

iterator end() { return this->c.end(); }

};

🔎