C语言库perror()函数

#include <stdio.h>

int main () {
   FILE *fp;

   /* first rename if there is any file */
   rename(file.txt, newfile.txt);

   /* now let's try to open same file */
   fp = fopen(file.txt, r);
   if( fp == NULL ) {
      perror(Error: );
      return(-1);
   }

   fclose(fp);
   return(0);
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...