当前位置: 代码迷 >> C语言 >> 帮忙调试下(VC编译下两个错误――LIBCD.lib(wincrt0.obj) : error LNK2001 ...
  详细解决方案

帮忙调试下(VC编译下两个错误――LIBCD.lib(wincrt0.obj) : error LNK2001 ...

热度:676   发布时间:2008-04-11 13:52:32.0
帮忙调试下(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();
}
搜索更多相关的解决方案: lib  error  编译  LIBCD  external  

----------------解决方案--------------------------------------------------------
测试正常,无报错;
----------------解决方案--------------------------------------------------------
VC++编译环境下有上面两个错误啊
----------------解决方案--------------------------------------------------------
  相关解决方案