In my header file for Class1 I have:
class Class1 : Class2::Callback {
  public:
  //Class2::Callback method
  virtual bool class2Method(int i);
}
in Class1.cxx I have:
bool Class1::class2Method(int i) {
  if (i == 1) return true;
  return false;
}
In another place I have:
IWantAClass2Callback((Class2::Callback)instanceOfClass1);
When I try and compile I get the following error:
MyApp.cxx In constructor 'MyApp()':
MyApp.cxx:55:55: error: 'Class2::Callback is an inaccessible base of Class1'
MyApp.cxx:55:55: error: cannot allocate an object of abstract type 'Class2::Callback'
Class2.h:16:10: note:    because the following virtual functions are pure within 'Class2::Callback'
Class2.h:19:18: note:    virtual bool Class2::Callback::class2Method(int)
What am I doing wrong?
Here's the definition of Class2::Callback as defined in Class2.h :
class Class2
{
public:
  struct Callback {
    virtual bool class2Method(int i) = 0;
  };
}
 
     
     
     
     
    