Consider using a `std::vector` instead. Of course performance is not going to matter here, but since you're only pushing and popping things at the end you don't need a linked list.