Looking for an equivalent container class that matches to C#'s Arraylist collections class. Is there anything that comes close to a container that can provide index based enumeration as well as hold multiple data types.
I am trying to create an vector that can hold multiple data types. For example:
//Is this line of code possible?? vector <int, string> vec; int i=0; string str = "test"; //add different data-type objs into my vector mutable array vec.push_back(i); vec.push_back(str);
Please advise, if there are other container classes in C++ that might help me achieve this functionality or there is a way to use vector class to store multiple data-types.