Could you please tell me what is the closest data type in C++ to python list? If there is nothing similar, how would you build it in C++?
Maybe storing boost::any in a std::vector? http://www.boost.org/doc/libs/1_54_0/doc/html/boost/any.html
Here is a simple working example. See James comments below too.
#include "../boost_1_54_0/boost/any.hpp"
#include
#include
#include
int main()
{
std::vector myList;
myList.push_back(std::string("Hello"));
myList.push_back(10);
myList.push_back(std::string("World"));
std::string any1 = boost::any_cast (myList[0]);
int any2 = boost::any_cast (myList[1]);
std::string any3 = boost::any_cast (myList[2]);
std::cout<