Why does the follwing code produce this error even though c is a struct and has a public inheritance by default??
struct c { protected: int i; public: c
You need:
class d : public c
class inheritance is private by default.
class
private
When you privately inherit from a class or a struct, you explicitly say, among other things, that direct conversion from a derived type to a base type isn't possible.
struct