帮忙调试下(VC编译下两个错误――LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external sym
#include <stdio.h>#include <malloc.h>
struct student
{
int num;
char name[12];
int score;
struct student *next;
};
struct student *creat()
{
int i, n;
struct student *head, *p, *r;
head=(struct student *)malloc(sizeof(struct student));
head->next=NULL;
r=head;
printf("请输入学生人数:\n");
scanf("%d",&n);
for(i=1; i<=n; i++)
{
p=(struct student *)malloc(sizeof(struct student));
printf("输入学生的学号:\n");
scanf("%d", &p->num);
printf("输入学生的姓名:\n");
scanf("%s", p->name);
printf("输人学生的成绩:\n");
scanf("%d", &p->score);
p->next=NULL;
r->next=p;
r=p;
}
return (head);
}
void main()
{
struct student *p;
struct student *creat();
p=creat();
}
----------------解决方案--------------------------------------------------------
测试正常,无报错;
----------------解决方案--------------------------------------------------------
VC++编译环境下有上面两个错误啊
----------------解决方案--------------------------------------------------------