#include <stdio.h>
#include <string.h>
//可变长参数函数写法
void add(char *type,...)
{
int *p;
p=(int *)(&type)+1;
for(int i=0;i<strlen(type);i++)
{
if(type[i])
{
printf("%d\n",*(p+i));
}
}
}
int main()
{
add("ddd",1,2,3);
return 0;
}