What is the problem,if any in the following code: struct Sample { int a; Sample() { a=0; } }; class Sample2:public Sample { }; struct Sample3:protected Sample2{};
nothing wrong will complie fine.
class cannot inherit from struct
struct cannot inherit from class
struct cannot have constructor