#include <stdio.h>
int main(void){
FILE * file;
char line[128];
char * ret;
file = fopen("users.txt", "r");
if(!file){
printf("文件打开错误");
return 1;
}
while(ret = fgets(line, sizeof(line), file)){
fputs(line, stdout);
}
fclose(file);
return 0;
}
fputs用法:int fputs( const char * str, FILE * stream);
最新推荐文章于 2022-02-22 19:54:50 发布