The problem is that it doesn't assign to the base-class variables - ONLY to the derived-class variables! If someone know how to simply do this I would be thankful for info. I've tried to search net and found some site with info on how to use them.
Something like this:
...
B(int a, int b, int c) : A(a){ //<--- B - Constructor in a derived class, A - base-class constructor
someVar1 = b;
someVar2 = c;
}
But it doesn't work. a variable remains unset.


Sign In
Create Account


Back to top









