I don't understand how to know the constant-ness of an iterator. Looking at the error message, it seems to say that the iterators returned by begin() and end() are constant, because when I add "const" to the parameters in print() the error goes away. The documentation doesn't say that begin() and end() return constant iterators. And are they constant references? Or is it that what they're pointing to is constant? Both? Thanks so much for your help. Here's the error:
no instance of function template"print" matches the argument list
> are they constant references? Or is it that what they're pointing to is constant?
they are temporary objects
you can't bind a non-const reference to a temporary object