Array of Array?

It's been a while since I've programmed in C++ but the need has risen. I am programming a simple program that will search a Database, iterate through the resulting set while performing some calculations on the data, and dumping the results into some array or container for exporting later. Ultimately this will be a DLL. I'm all fine up to the point of what datatype/container to hold the data after the calculations have occurred. I already have this programmed in PHP and use a multidimentional array. But with C++ a multidimentional array can only hold identical datatypes; where in PHP a multidimentional array can hold different datatypes. For example, I have 38 fields I will be pulling from the database which contain integers, strings, dates and floats. What would be the best way to store the data prior to exporting? One idea I initially thought was to have a separate list for every field since multidimentional arrays are just arrays of arrays; I also thought of creating a new class to hold the data. Before I got down the wrong track I thought I'd check to see if anyone here has an idea that is blatently obvious that I'm not thinking of. Any suggestions/thoughts/ideas?
closed account (S6k9GNh0)
You can use maps of maps.

http://cplusplus.com/reference/stl/map/
You want Boost::Any for this...
Topic archived. No new replies allowed.