Boost documentation.

Jacek Generowicz jmg at ecs.soton.ac.uk
Wed Mar 28 13:12:34 EST 2001


Jacek Generowicz <jmg at ecs.soton.ac.uk> writes:

> Well, I've managed to get an attempt past the compiler now, so I'll
> post it here for a critique.
> 
> It provides one function called `hmm', which takes a tuple (of
> integers), and should print out those integers. Unfortunately it
> thinks all the integers are zero (though it does get the correct
> number of them).

OK, i was not initialized to zero here:

>   for ( int i; i<tup.size(); i++ ) {

(But surely this calls the default constructor for int, which should
initialize it to zero ?)

> When I try to do something similar with lists rather than tuples, the
> get() method appears to be unavailable.

I'd still be interested in knowing how to do it with lists.

Jacek



More information about the Python-list mailing list