struct person
{
int id ;
cons char* name;
};
person a[] = {{1,"aa"}{2,"bb"}}
person b[] = {{1,"aa"}{2,"bb"}}
person c[] = {{1,"aa"}{2,"bb"}}
void fuction(...) //这里面应该怎么写 才能传进去呢??
{
for(int i = 0; i<pcount; ++i)
{
int id = p[i].id; //我要实现类似这样的效果
}
}
void main()
{
if(conditon1)
fuction(a);//不知道这里应该怎样传
if(conditon2)
fuction(b);//不知道这里应该怎样传
if(conditon3)
fuction(c);//不知道这里应该怎样传
} |