How to give properties to c++ classes (interfaces)
- by caas
Hello,
I have built several classes (A, B, C...) which perform operations on the same BaseClass. Example:
struct BaseClass {
int method1();
int method2();
int method3();
}
struct A { int methodA(BaseClass& bc) { return bc.method1(); } }
struct B { int methodB(BaseClass& bc) { return bc.method2()+bc.method1(); } }
struct C {…