View Single Post
  #4   Spotlight this post!  
Unread 15-02-2009, 00:40
TimCraig TimCraig is offline
Registered User
AKA: Tim Craig
no team
 
Join Date: Aug 2004
Rookie Year: 2003
Location: San Jose, CA
Posts: 221
TimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to beholdTimCraig is a splendid one to behold
Re: Modifying .CPP files

Quote:
Originally Posted by byteit101 View Post
I would create a class like such:
Code:
class OurRobotDrive:private RobotDrive
{
public:
void ourFunction(int speed)
{
...
}
}
and you can still have the other functions!
Generally, if you want all the public members in the base class visible for the "is-a" relationship, you would use public inheritance. You don't see private inheritance used much.
Reply With Quote