ソースを参照

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;


読み込み中…
キャンセル
保存