By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,414 Members | 1,057 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,414 IT Pros & Developers. It's quick & easy.

substitue for LISTS and TUPLEs in C++

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
"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.