I assume this is appropraite use(i've seen it used this way) but I'm not 100% sure on why.. with the previous definition, as i understand it, the const is there because I'm not editing values v1 & v2 and the function should not edit their values?( see following code ) or (if yes but not only for that reason) what other purposes does it serve?
1 2 3
Vector v1, v2, v3;
//declare some values for v1 & v2 other than what was assigned in the default constructor
v3 = v1+ v2;
I appreciate any time you sacrifice in reviewing my question. I'm just curious because I feel I need to understand this chapter 100% before I move into the next chapter which builds off of this chapter.
In a nutshell : I assume my understanding of the use of the const qualifier to be correct, in that the function should not edit the implicit nor the explicit parameter, but are there other uses for this const qualifier?