请帮忙找一下错误
程序代码:
#include <stdio.h> struct car{ int id; char *name; }*car1; int main(){ car1=(struct car*)malloc(sizeof(struct car)); printf("insert into id,name:"); scanf("%d,%s",&car1->id,&car1->name); printf("id=%d,name=%s",car1->id,car1->name); getchar(); }错哪里,运行时出错car1->name无法显示
[ 本帖最后由 lmn20100929 于 2011-3-26 22:45 编辑 ]