What's the C++ version of Java's ArrayList

interstar picture interstar · Oct 19, 2010 · Viewed 138.3k times · Source

Just getting back into using C++ and trying to convert a simple Java program I wrote recently.

What's the preferred equivalent to the Java ArrayList in C++?

Answer

SLaks picture SLaks · Oct 19, 2010

Use the std::vector class from the standard library.