求找错误
#include <stdio.h>#include <string.h>
unsigned char xx[50][80] ;
int maxline = 0 ; /* 文章的总行数 */
int ReadDat(void) ;
void WriteDat(void) ;
void ChA(void)
{int i,j;
char t;
for(i=0;i<maxline;i++)
{t=xx[i][0];
for(j=0;j<(strlen(xx[i])-1);j++)
xx[i][j]+=xx[i][j+1];
xx[i][strlen(xx[i])-1]+=xx[i][0];
strrve(xx[i]);
}
}
void main()
{
if(ReadDat()) {
printf("数据文件IN.DAT不能打开!\n\007") ;
return ;
}
ChA() ;
WriteDat() ;
}
int ReadDat(void)
{
FILE *fp ;
int i = 0 ;
char *p ;
if((fp = fopen("C:\\WEXAM\\35990001\\IN.DAT", "r")) == NULL) return 1 ;
while(fgets(xx[i], 80, fp) != NULL) {
p = strchr(xx[i], '\n') ;
if(p) *p = 0 ;
i++ ;
}
maxline = i ;
fclose(fp) ;
return 0 ;
}
void WriteDat(void)
{
FILE *fp ;
int i ;
fp = fopen("C:\\WEXAM\\35990001\\OUT.DAT", "w") ;
for(i = 0 ; i < maxline ; i++) {
printf("%s\n", xx[i]) ;
fprintf(fp, "%s\n", xx[i]) ;
}
fclose(fp) ;
}
--------------------Configuration: prog1 - Win32 Debug--------------------
Linking...
prog1.obj : error LNK2001: unresolved external symbol _strrve
Debug/prog1.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
prog1.exe - 1 error(s), 0 warning(s)