C语言结构体问题,小白求解决,刚用Xcode
xcode吧
全部回复
仅看楼主
level 1
文超周11 楼主
#include <stdio.h>
typedef struct
{
char s[10];
int t;
}ST;
getdata(ST *p)
{scanf("%s%d",p->s,&p->t);}
int main(int argc, const char * argv[]) {
// insert code here...
ST a;
getdata(&a);
printf("%s,%d\n",a.s,a.t);
printf("Hello, World! And I love you!\n");
return 0;
}
2014年10月19日 07点10分 1
level 8
函数 getdata的类型没有写
2014年10月25日 07点10分 3
恩,发现了,谢谢你[开心]
2014年10月25日 11点10分
1