Hi!
Sorry for asking such basic question, let's I have some source code for two classes : class1.cpp + class2.cpp
in Class1.h I have two functions declared
protected:
drawworld
private:
initialize
initialize is called in the construtor:
Class1::Class1(xxx): Class2(xxx){
initialize();
}
xxx are lots of input params
Now my problem is that I want to change both initialize and drawworld fucntions, how can I do this?
I don't want to modify Class1.cpp code. Do I have to create a new class Class3 derived from Class2 and create a function initialize, will it overides Class2 initialize though?
I hope this is clear.
Thanks!
Sorry for asking such basic question, let's I have some source code for two classes : class1.cpp + class2.cpp
in Class1.h I have two functions declared
protected:
drawworld
private:
initialize
initialize is called in the construtor:
Class1::Class1(xxx): Class2(xxx){
initialize();
}
xxx are lots of input params
Now my problem is that I want to change both initialize and drawworld fucntions, how can I do this?
I don't want to modify Class1.cpp code. Do I have to create a new class Class3 derived from Class2 and create a function initialize, will it overides Class2 initialize though?
I hope this is clear.
Thanks!