#ifndef NOVICE_VECTOR_H__ #define NOVICE_VECTOR_H__ template<typename T> class novice_vector { private: T* data_; // è¦ç´ æ ¼ç´é å size_t size_; // è¦ç´ æ° size_t capacity_; // 容éï¼æ ¼ç´å¯è½ãªè¦ç´ æ°ï¼ public: novice_vector() : data_(nullptr), size_(0), capacity_(0) {} ~novice_vector() { delete[] data_; } size_t size() const { return size_; } size_t capacity() const { return capacity_; } void clear() { size_ = 0; } // å°
{{#tags}}- {{label}}
{{/tags}}