C 语言的读取文件

#include <stdio.h>

main()

{

    FILE *fp;

    if((fp=fopen("in.txt","rt"))==NULL)

    {

        printf("错误:文件不存在");

        getch();

        exit(1);

    }

    while(fscanf(fp,"%d",&a) != EOF ) 

	{

		......

	}

......

  

你可能感兴趣的:(读取文件)