This is the error i get.
: error C2440: 'return' : cannot convert from 'class SharedPtr<class TrackableObject> *const ' to 'class TrackableObject &'
This is the code.
* This operator will return a refernce to the SharedPtrImpl object.
* This function will allow for intuitive use of the operator to be used
* to access
* our pointer objects. It will return a reference to the SharedPtrImpl
* @return TYPE reference to an object of type TYPE
TYPE & operator*(void) const
Ive tried returning: &this, *this.
Any help would be appreciated.
TYPE & in the context you've used it is a reference to a TYPE . If you want to return a pointer it should be TYPE*.