How to write a file in which I could add access to some methods of some classes ?

A very long title for my question .....
I have, in example, 10 multipurpose clases.
I want to write a 'caller' to some methods of this 10 clases
Is it possible ?

Using pseudode a imagine something like this.
File "Multi.h"
include class1, class n
add class1.method_1
add class2.method_4
...
add class10.method_2
(Of course it woold not be possible have two functions with the same name and identical parameters, but yes if the parameters where different)

Later into mycode I'd write:
include "multi.h"
and I'd call the known functions directly:
method_1(a,b,c);

I'm talking about something impossible ?
Thanks



Last edited on
Are you asking about multiple inheritance?
No, I dont want inheritance.
I'd like some 'import' or 'inheritate class#.method# command' becasue I only want to 'include' some functions.
I think that what I want is some complicated.
Maybe the solution are inheritance and having a class structure more 'open'
(That is instead of have class1 and 10 methods, can be better have 3 classes and 3,3,4, methods lo let a convenient develop, ins't it ? )
Thanks in any way.,
The only way for one class to have the methods of another in c++ is inheritance. Of course, you could add members instead of inheritance. The result is mostly the same.
You can't choose what to inherit.
Topic archived. No new replies allowed.