I've read about class & multiple inherit in many shitty pages on the internet but they all failed to give me an example.
Can somebody give me a example: How do i multiple inherit int, float from first class and char, string from other class into the third class ?
class Numbers {
public:
int a;
float b;
};
class Characters {
public:
char c;
std::string d;
};
class NumbersAndCharacters: public Numbers, public Characters {
// whatever is specific to this class goes here
};
That's it. Any instance of NumbersAndCharacters will have all four members.