Solved

Inheritance in C++ - VERY URGENT

Posted on 2006-11-20
2
320 Views
Last Modified: 2010-04-16
How do I go about having one class inherit from another class?
0
Comment
Question by:alligarbage
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Starting up a Project

632 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