C++中的class (2)
class Father { protected void methodA(){ //do something } private void methodB(){//do something } } class Child:Father { } 那么Child child=new Child(); child.methodA(); //Right child.methodB(); //Wrong
class Father { protected void methodA(){ //do something } private void methodB(){//do something } } class Child:Father { } 那么Child child=new Child(); child.methodA(); //Right child.methodB(); //Wrong