瀏覽代碼

added extend for array list

master
Felix Brendel 5 年之前
父節點
當前提交
33bac14926
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      arraylist.hpp

+ 9
- 0
arraylist.hpp 查看文件

@@ -26,6 +26,15 @@ struct Array_List {
}
}


void extend(std::initializer_list<type> l) {
reserve(l.size());
for (type e : l) {
append(e);
}
}


void dealloc() {
free(data);
data = nullptr;


Loading…
取消
儲存