I've found that you can use the C++ <vector> library, which is a lot less complicated than my previous method.