#include <iostream>
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
float arr[100000]={0};
ifstream infile("D://1.txt");
int count = 0;
while(!infile.eof())
{
infile>>arr[count];
++count;
}
infile.close();
for ( int j= 0; j < count; ++j)
cout<<arr[j]<<endl;
return 0;
}
C++ txt文件中的数据读入数组
最新推荐文章于 2023-05-09 19:17:47 发布