+ 4

Can structures perform inheritance as classes do?

18th Jul 2017, 10:38 AM
Himani
2 Answers
+ 3
Yes they can. Structures inherit publicly while classes inherit privately by default.
24th Jul 2017, 1:51 PM
Lakshay
Lakshay - avatar
+ 2
yes struct A { }; struct B : A { }; struct C : B { };
18th Jul 2017, 10:45 AM
Kedar Kale
Kedar Kale - avatar