//创建的是一个以学生学号和成绩作为数据的链表。在此处只设立两个节点。struct Student{ long num; float score; struct Student *next;}*p1,*p2;struct Student *creat(){ struct Student *head; int n=0; scanf("%ld,%f",&p1->num,&p1->score); head=0; while(p1->num!=0) { n=n+1; if(n==1) head=p1; else p2->next=p1; p1=p2; scanf("%ld,%f",&p1->num,&p1->score); } p2->next=0; return(head);}问题是:\Program Files\Microsoft Visual Studio\MyProjects\zxc\123.cpp(12) : error C2065: 'scanf' : undeclared identifier
- 3 回答
- 0 关注
- 4471 浏览
添加回答
举报
0/150
提交
取消