Inheritance in C++ - VERY URGENT

How do I go about having one class inherit from another class?
alligarbageAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Raynard7Connect With a Mentor Commented:
I do not think that it can be explained more clearly than at
http://www.cplusplus.com/doc/tutorial/inheritance.html
0
 
alligarbageAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.