Solution
Here is the solution to the problem in the previous lesson.
We'll cover the following...
We'll cover the following...
Explanation
The following changes were applied:
- We turned
StringVectorHolder::printinto aconstfunction - We gave
StringVectorHolder::operator[]aconstoverload- It still invoked a compiler error as the return type was a non-
const&that discarded theconstqualifier, so we turned the return type into aconst&.
- It still invoked a compiler error as the return type was a non-