Python to C++ conversion substituting vectors for lists in a recursive function
MyHaz
support.services.complaints at gmail.com
Wed Mar 23 06:39:55 EST 2005
I didn't look at the original code but i you should know that passing
vectors directly (i.e by value) to functions is not a good idea
(results in big copy), its better to use `const vector<> &` or
`vector<> &` (i.e. by reference). In general you should try to reduce
the number of vector coping to a minimum.
As for the error in the code, it would be better to see the example of
the error, be it compiler or other wise.
I have a question about this line
`vector<int> tseq = nseq.at(0);`
as i have never seen the at() member of vector. And its not referenced
on the sgi site http://www.sgi.com/tech/stl/Vector.html
what version of the STL are you using?
More information about the Python-list
mailing list