Cd is a base class for Classic and has various private member fields and a constructor with prototype
Code:
Cd(char * s1, char * s2, int n, double x);
And all this does is just assign the values given appropriately to the private member fields.
Now for Classic we have the prototype
Code:
Classic(char * s1, char * s2, int n, double x, char * w);
and Classic adds exactly one private member, which is char work[50];
Well, the constructor for Classic can't access the private members of Cd, so the implementation goes:
Code:
Classic::Classic(char * s1, char *s2, int n, double x, char * w)
:Cd(s1, s2, n, x)
{
// code for copying w to work[50] array
}
The extra ":Cd(s1, s2, n, x)" is what I was talking about (similarly for assignment a line like Cd:
perator=(d); in the code looks weird the first time you see it--which for me was only the last few days).