pointer to class problem

I have a class Dog, and another class template Cat. In Dog's constructor I pass a pointer to a Cat<char> object. I then use the pointer with the -> operator, but i keep getting the error.


In constructor 'Display16::Display16(int, int, Cat<char>&)':|
error: base operand of '->' has non-pointer type 'Cat<char>'
It looks like you are using the Cat<char> object instead of the pointer.
Last edited on
Topic archived. No new replies allowed.