#include <stdio.h>
#include <stdlib.h>
#define F(_class, _func, ...) _func(_class, ##__VA_ARGS__)
typedef
struct
{
int
number;
} *MyClass;
MyClass newMyClass()
{
MyClass res = (MyClass)
malloc
(
sizeof
(MyClass));
res->number = 521;
return
res;
}
void
myfunc(MyClass mc,
char
str[],
int
x)
{
printf
(
"%d %s %d\n"
, mc->number, str, x);
}
int
main()
{
MyClass myclass = newMyClass();
F(myclass, myfunc,
"aaa"
, 2);
return
0;
}
大才!