Explorar el Código

added extend for array list

master
Felix Brendel hace 5 años
padre
commit
33bac14926
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  1. +9
    -0
      arraylist.hpp

+ 9
- 0
arraylist.hpp Ver fichero

@@ -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;


Cargando…
Cancelar
Guardar