Boost logo

Boost Users :

From: Alberto (alberto.ing_at_[hidden])
Date: 2007-04-30 02:36:17


2007/4/28, Jeff <jeff_j_dunlap_at_[hidden]>:
>
> I have been using STL containers to store structures of data but I would
> like
> to know if there is an easier solution such as a dynamically sized
> container
> that stores data in a spreadsheet like fashion.
>
> For example, I would like to store rows of columns of different data
> types.
>
> Here is a sample of data I would like to store, also, I would like fast
> random
> access to the elements to read and modify existing data:
>
> Name, Age, HomeOwner
> John 42 true
> Mark 24 false
> Mary 29 true
>
> If anyone can suggest such a container please let me know.

boost::tuple (now tr1::tuple) will do:

Something like:
boost::tuple<std::string, int, std::string>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net