substitue for LISTS and TUPLEs in C++
Roy Smith
roy at panix.com
Thu Jun 16 23:50:26 EDT 2005
"GujuBoy" <dirgesh at gmail.com> wrote:
> I am trying to transfer some code from PYTHON to C++. What is the best
> substitute for a LIST and TUPLE in C++.
Depending on exactly what operations you plan to do with it, the Python
list will translate into some kind of STL sequence container like vector.
Tuples in Python are sometimes used like ummutable lists, in which case
they'll also translate into STL vectors. Sometimes tuples are used as
anonymous fixed-length heterogeneous data structures, in which case they'll
translate to a C++ struct.
More information about the Python-list
mailing list