Thursday, July 9, 2009

What is the syntax for derived classes in C++?

A simple example would be useful. I ran across this concept in my C++ class and it really appealed to me...

What is the syntax for derived classes in C++?
actually it would be like this:





class CDerivedClass : public CParentClass


{


// new stuff in CDerivedClass


};
Reply:void class1 : class2


{








}





class1 inherits all the members from class2


No comments:

Post a Comment