Solved

Inheritance in C++ - VERY URGENT

Posted on 2006-11-20
2
304 Views
Last Modified: 2010-04-16
How do I go about having one class inherit from another class?
0
Comment
Question by:alligarbage
2 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 500 total points
ID: 17977728
I do not think that it can be explained more clearly than at
http://www.cplusplus.com/doc/tutorial/inheritance.html
0
 

Author Comment

by:alligarbage
ID: 17977736
So, all I have to do is basically after the name of the class I am trying to inherit to, I type the name of the class I'm trying to get it from, right?

Example:
Food (class I'm trying to inherit from)
Car (class I'm trying to inherit to)

class Food
{
     code here
}

class Car: public Food
{
      code here
}
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question