Abstract Class & Derived classes

I have three classes but I'm having trouble seeing why one class can use another. Allow me to expand :

Class one is our Abstract class dubbed "AcctABC"
Classes two and three are derived classes dubbed "Brass" and "BrassPlus"

In the header file (all three classes consolidated to one header/cpp file) my Brass class is declared as..

class Brass : public AcctABC

and my BrassPlus class is declared

class BrassPlus : public AcctABC

My issue comes in with the BrassPlus class...

One of my BrassPlus' constructors looks like this :

BrassPlus(const Brass & ba, double m1 = 500, double r = 0.10)

How is it possible for BrassPlus to use a reference to a Brass object in its constructor if the BrassPlus type is not derived from the Brass class?

For some reason it works(which I am trying to find out) but I imagined I would have to use a declaration similar to the following:

class BrassPlus: public Brass : public AcctABC

I know the syntax is probably horrific but what i'm triyn got say is brassplus is derived from the brass class which is derived from the AcctABC class.

Help?
How is it possible for BrassPlus to use a reference to a Brass object in its constructor if the BrassPlus type is not derived from the Brass class?


Yet you've no problem with the BrassPlus using objects of type double in its constructor? Why should BrassPlus have any trouble using Brass in its constructor? A class' functions do not have to use just objects that class is related to.
/facepalm


Thanks - I think my brain is turned off at the moment.
Topic archived. No new replies allowed.