19 lines
420 B
C++
19 lines
420 B
C++
#pragma once
|
|
|
|
#include <cstdlib>
|
|
#include <stdio.h>
|
|
|
|
typedef unsigned int uint;
|
|
|
|
template<class T> struct array {
|
|
T* data;
|
|
size_t len;
|
|
size_t cap;
|
|
inline T& operator[](int i) { return data[i]; }
|
|
};
|
|
|
|
template<class T> void append(array<T>& a, T el);
|
|
template<class T> T pop(array<T>& a);
|
|
template<class T> void resize(array<T>& a, size_t new_size);
|
|
bool read_file(array<char>* out, const char* filepath);
|