discards qualifiers

This is a discussion on discards qualifiers within the C++ Programming forums, part of the General Programming Boards category; √ the book
√ google search
√ searched cboard
This is homework but I think it's a small enough and ...

discards qualifiers

√ the book
√ google search
√ searched cboard

This is homework but I think it's a small enough and valid enough question.
I'm down to one error which is commented out in main.cpp
I've researched the "discards qualifiers error" and most solutions seem to say that it means I'm mismatching a const function with a non const object. as far as I can tell, operator/ returns const vec and print() is a const void.

any ideas?

one more question. My teacher says that operator overloading always carries the same constellation of modifiers. is there a reference somewhere that I can look up what I should be using for each one?

Const binds to the type if it's before the function because const T and T const are the same thing.
Therefore, const must come after the function name if the function itself should be const.
And remember that temporaries will only bind to const T, thus you won't be able to call non-const functions on temporaries (which your result is).

Thanks guys. I appreciate this. I'll give myself a few more No-Duh questions and I should be off and running. I really wish they would teach languages in a context where they were useful out of the box. It would be a lot easier to learn