使用容器配置器實現STL模板庫中的vector(簡化版)容器

代碼中涉及的知識點:ios 1,類模板數組 2,容器適配器函數 #include <iostream> #include <vector> using namespace std; template<typename T> struct Allocator//容器適配器 { //負責申請空間 T *allocate(size_t size) { return (T*)malloc(size
相關文章
相關標籤/搜索