0

Can a struct be inherited?

27th Jul 2016, 7:05 AM
chaitanya guruprasad
chaitanya guruprasad - avatar
5 Respuestas
+ 1
No, structs do not support inheritance and cannot contain overridable methods.
22nd Aug 2016, 9:23 PM
Marco Roessen
Marco Roessen - avatar
+ 1
I guess It can not because it is value type and value type do not offer inheritance and polymorphism
15th Sep 2016, 3:36 PM
Sagar Joshi
Sagar Joshi - avatar
0
yes it cans exactly like a class
27th Jul 2016, 3:12 PM
pasquale napolitano
pasquale napolitano - avatar
0
yes, structure in cpp are like classes with a partial difference in defining of puplic and private variables. so they can be inherited.
28th Sep 2016, 2:45 PM
parisa
parisa - avatar
0
The answer is No
16th Jul 2021, 6:29 AM
Kevin Cook
Kevin Cook - avatar