Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 86595

One of the four pillars of object-oriented programming (OOP), inheritance establishes a "is-a" relationship between objects. For example, a "Cat" object can be treated in code as any other "Animal" object because a "Cat" is-a "Animal".

3 votes
2 answers
2k views

Creating n-dimensional mathematical vector classes through inheritance

Right now I have no knowledge of templates, but I just finished learning about inheritance, and wanted to apply it to a Vector3 class that I had already created. … I've included just the header because I'm really concerned only with making sure my inheritance structure is adequate. …
AntiElephant's user avatar
4 votes
4 answers
5k views

An attempt at inheritance (Geometric Shapes)

I'm reading through the chapter on inheritance from C++ Primer 5th Edition. … It asks Organize the following type into an inheritance hierarchy: (b) Geometric primitives (such as box, circle, sphere, cone) Identify some of the likely virtual functions as well as public and protected …
AntiElephant's user avatar