这是我测试的程序
#include<fstream>
#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
ifstream fin( "k.out" );
int main()
{
time_t o=clock();
FILE*p=fopen( "k.out","r+" );
//std::ios::sync_with_stdio(false);
int u;
for ( int i=1; i<=100000; i++ ) fscanf(p,"%d",u);
time_t s=clock();
cout<<(s-o);
return 0;
}
#include<fstream>
#include<iostream>
#include<cstdio>
#include<ctime>
using namespace std;
ifstream fin( "k.out" );
int main()
{
time_t o=clock();
FILE*p=fopen( "k.out","r+" );
//std::ios::sync_with_stdio(false);
int u;
for ( int i=1; i<=100000; i++ ) fscanf(p,"%d",u);
time_t s=clock();
cout<<(s-o);
return 0;
}