P
paolo.dx
Hello, I have to call a member funtion "myclass.myfunc()" from another
function "void method();" but I don't know the name of "myclass" and
"myfunc()" because I'm writing a library.h that has to be put in the
header of a given file.
this is an example of the given file, obviously I can't modify this
file, but I know that the funcitions are always without arguments and
void type.
CLASS(myclass){
int counter;
void myfunc();
CTOR(conta){
TYPE_METHOD(myfunc);
conteggio=0;
};
};
I redefine CLASS and CTOR with these define
#define CLASS(nome_classe) \
struct nome_classe
#define CTOR(nome_func) \
nome_func()
and I can redefine TYPE_METHOD using #define with whatever I want, but
there must be the call to "method(....);
void method(.....){
while(1){
myclass.myfunc();
WAIT();
}
}
the function method can take everthing you want.
Thanks for any help!
Paolo
function "void method();" but I don't know the name of "myclass" and
"myfunc()" because I'm writing a library.h that has to be put in the
header of a given file.
this is an example of the given file, obviously I can't modify this
file, but I know that the funcitions are always without arguments and
void type.
CLASS(myclass){
int counter;
void myfunc();
CTOR(conta){
TYPE_METHOD(myfunc);
conteggio=0;
};
};
I redefine CLASS and CTOR with these define
#define CLASS(nome_classe) \
struct nome_classe
#define CTOR(nome_func) \
nome_func()
and I can redefine TYPE_METHOD using #define with whatever I want, but
there must be the call to "method(....);
void method(.....){
while(1){
myclass.myfunc();
WAIT();
}
}
the function method can take everthing you want.
Thanks for any help!
Paolo