I'd like to understand why I'm able to declare a pure virtual method in an Interface class, but when implementing it, I could make it private and the compiler doesn't scream.
class I_A {
public:
void A1 () = 0;
}
class A : public I_A {
private:
A1();
}
I could even add the 'override' keyword to explicitly indicate that I'm overriding this very method, and still, a successful build.
A related question should be - There isn't any virtue in defining a private method in abstract class. But still, it's possible. what for? and lastly, isn't the visibility of a method (private/public) part of the attributes that suppose to be passed on to its successors?