记录一下防止以后糊涂。
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct{
char a[10];
int b;
}str;
void fun(str **s)
{
int i;
*s = (str *)malloc(sizeof(*s) * 5);
(*s + 2)->b = 10;
strcpy((*s + 2)->a,"abc");
}
int main()
{
str *s;
fun(&s);
printf("%d\n",(s + 2)->b);
return 0;
}