D
David Hill
Hello -
I am using a library that takes a function pointer as an argument. Is the code below not possible?
int library_func(void (*func)(int, short, void *));
I am trying to do this...
class Test {
public:
Test();
void a(int, short, void *);
void loop(void);
};
Test::Test()
{
}
void Test::a(int a, short b, void *c)
{
}
void Server::loop(void)
{
void (*func)(int, short, void *) = a;
library_function(func);
}
int main(void)
{
Test s;
s.loop();
return (0);
}
I am using a library that takes a function pointer as an argument. Is the code below not possible?
int library_func(void (*func)(int, short, void *));
I am trying to do this...
class Test {
public:
Test();
void a(int, short, void *);
void loop(void);
};
Test::Test()
{
}
void Test::a(int a, short b, void *c)
{
}
void Server::loop(void)
{
void (*func)(int, short, void *) = a;
library_function(func);
}
int main(void)
{
Test s;
s.loop();
return (0);
}