I'd like to suggest the following minor modifications,
which in practice would probably make no discernable
difference, but, hey, fast and light is the goal, right?
>
> #include <vector>
> #include <sstream>
> // stdio.h isn't necessary
> [..]
// we only need the "o" side of the stringstream
// so this is a bit lighter-weight, IIRC
std::ostringstream s;
// pointer arithmetic is usually cheaper than
// indexing
for ( std::vector<int>::const_iterator i = intvec.begin();
i != intvec.end(); ++i ) {
// a single newline char will do
s << *i << '\n';
}
boost::lexical_cast<> is also handy for this sort of thing, btw.
Best,
Stan
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk