首页WIN10问题下面代码哪出了问题?错误:ld retuened 1exitstatus

下面代码哪出了问题?错误:ld retuened 1exitstatus

时间2022-12-13 14:00:08发布分享专员分类WIN10问题浏览64

这个有点难了还是来个专业的给findnext 你解释下吧

  程序有3处错,且都是拼写错,以下是改好的

#include

#include

#include

#include

#include

#define MAX      256

long  total;

int countLines(const char *filename);

void findAllCodes(const char *path);

void findAllFiles(const char *path);

int countLines(const char *filename)

   FILE *fp;

   int count = 0;

   int temp;

   if((fp = fopen(filename, "r")) == NULL)

       fprintf(stderr, "Can not open the file:%s

", filename);

       return 0;

   while((temp = fgetc(fp)) != EOF)  //拼写错

       if(temp == '

           count ;

   fclose(fp);

   return count;

void findAllCodes(const char *path)

   struct _finddata_t fa;

   long handle;

   char thePath[MAX], target[MAX];

   strcpy(thePath, path);

   if((handle = _findfirst(strcat(thePath, "/*findnext 。

  c"), &fa)) != -1L)

       do

           sprintf(target, "%s/%s", path, fafindnext 。

  name);

           total = countLines(target);

       while(_findnext(handle, &fa) == 0);

   _findclose(handle); //拼写错

void findALLDirs(const char *path)

   struct _finddata_t fa;

   long handle;

   char thePath[MAX];

   strcpy(thePath, path);

   if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)

       fprintf(stderr, "The path %s is wrong!

", path);

       return;

   do

       if(!strcmp(fafindnext 。

  name, "findnext 。") || !strcmp(fa。name, "。。"))

           continue;

       if(fafindnext 。attrib == _A_SUBDIR)

           sprintf(thePath, "%s/%s", path, fafindnext 。

  name);

           findAllCodes(thePath);  //拼写错

           findALLDirs(thePath);

   while(_findnext(handle, &fa) == 0);

   _findclose(handle);

下面代码哪出了问题?错误:ld retuened 1exitstatus

int main()

   char path[MAX] = "findnext 。

   printf("计算中findnext 。。。

   findAllCodes(path);

   findALLDirs(path);

   printf("目前你写了 %ld 行代码findnext !

", total);

   return 0;

findnext 我上面已经改好的,做注释的地方就是我修改过的

我这里测试通过的,若你还报错,把你的开发工具及详细的错误信息贴出来findnext 。

爱资源吧版权声明:以上文中内容来自网络,如有侵权请联系删除,谢谢。

1exitstatusretuened1exitstatusretuenedfindnext
在VC中findnext读取文件是按照什么顺序啊? 天翼云VR全球首发VR纪录片《太空探索家:国际空间站体验》中文字幕版