#include < stdio.h > #include < malloc.h > typedef struct st {int x;int y;} sst;sst * boo(sst ** ); int main() {sst *p;boo(&p);printf("x: %d , y: %d", p->x, p->y);free(p);return 0;} sst * boo(sst ** ps) {*ps = (sst *)malloc(sizeof(struct st));(**ps).x = 100;(**ps).y = 120;return *ps;} 转载于:https://www.cnblogs.com/scroot/archive/2008/07/22/1248567.html