C++编译过程没出错,但执行时出错,说我的文件不存在,何解?
#include<stdio.h>#include<malloc.h>
#define MaxSize 50
typedef char e;
typedef struct
{char e[MaxSize];
int length;
int i;
}Sqlist;
void InitList(Sqlist * &L)
{L=(Sqlist *)malloc(sizeof(Sqlist));
L->length=0;
}
void destroyList(Sqlist * &L)
{
free(L);
}
bool ListEmpty(Sqlist * &L)
{return(L->length==0);
}
int ListLength(Sqlist * &L)
{return(L->length );
}
void DispList(Sqlist * L)
{int i;
if(ListEmpty(L))
return;
for(i=0;i<L->length;i++ )
printf("%c",L->i);
printf("\n");
}
以下是出错的显示:
inking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/pro.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
pro.exe - 1 error(s), 0 warning(s)