class Base{
public:
Base(int val):_id(val){};
int _id;
};
class Derived : Base {
public:
Derived(int val):Base(_id+val){};
};
int main(){
Derived d(60);
}
why doesn't this give an error? Base class is still not constructed but I'm able to use '_id'?
thanks