First page Back Continue Last page Graphics
Virtual Methods (cont.)
Review Prata:usebrass2.cpp for an example of calling virtual functions.
- An array must be of all the same type.
- You couldn't have some Brass and some Brass Plus entries!!
- But, you CAN have an array of pointers to Brass. (since they are all the same type)
- AND, you can have a Brass * ptr point to EITHER a Brass object or a BrassPlus object.