Are structure support inheritance

1 answer

Answer

1046951

2026-05-16 20:10

+ Follow

In programming, structures (or structs) typically do not support inheritance in the same way that classes do, especially in languages like C. However, in languages like C++, structs can inherit from other structs or classes, allowing for some level of inheritance. The main distinction is that while structs default to public access, classes default to private. Thus, while inheritance is possible with structs in certain languages, it is not a fundamental characteristic of all structures.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.