C++ allow to declare a member with the same name in parent and child class but ignores the base member is there any way to prevent declaring a member in base and child by compiler setting that compiler generate error for that? thanks.