typedef struct
{
int a;
char b;
int (*p)(int,char);
} xhl;
int test(int m_a,char m_b);
int main()
{
xhl m_s;
m_s.a=5;
m_s.b='w';
m_s.p=test;
(*m_s.p)(m_s.a,m_s.b);
return 0;
}
int test(int m_a,char m_b)
{
printf("%d,%c\n",m_a,m_b);
return 0;
}
用纯c写一个类
最新推荐文章于 2022-08-23 10:35:06 发布