[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Virtual members Up: More C++ Previous: Exceptions

   
More on Classes

Concrete Classes are the simple classes that behave just like int, char, etc once they're set up.

To make best use of Classes it's sometimes useful to redefine the operators as well as define member functions. For instance, if you were going to invent a class to deal with strings, it would be nice for '+' to join strings together. Or if you wanted to add range-checking to arrays, you'd have to modify the [ ] behaviour. Below are some examples of overloading, but first more on the mechanism of inheritance.



 

Tim Love
2001-07-05