470,849 Members | 1,350 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

substitue for LISTS and TUPLEs in C++

I am trying to transfer some code from PYTHON to C++. What is the best
substitute for a LIST and TUPLE in C++.

please advice.

Jul 19 '05 #1
1 2021
"GujuBoy" <di*****@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.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Ivan Voras | last post: by
42 posts views Thread by Jeff Wagner | last post: by
2 posts views Thread by beliavsky | last post: by
1 post views Thread by Gabriel B. | last post: by
10 posts views Thread by Philippe C. Martin | last post: by
7 posts views Thread by MTD | last post: by
12 posts views Thread by rshepard | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.