Open a file in the constructor, close it in the destructor. RAII with 0 allocations.
std::vector<int> allocated and freed on the stack will allocate an array for its int’s on the heap…
std::vector<int> allocated and freed on the stack will allocate an array for its int’s on the heap…