Question: I'm getting a no viable conversion from 'Test' to 'Test *'. In the main, ::create instantiates my protected variable. I created two class objects of
I'm getting a "no viable conversion from 'Test' to 'Test *'. In the main, ::create instantiates my protected variable. I created two class objects of type pointer. I then execute the pointer's function by passing in another pointer of the same class. For the function, its purpose is to modify the pointer values (protected variable). The problem is I'm getting a no viable conversion error.
Note: I removed irrelevant code to make it easier to read.

Note: If your solution involves main(), note it cannot be changed. Only the Test.h and Test.cc can be modified.
* test.h class Test f protected: std::vector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
