![]() |
#2
yuccn2013-05-24 12:12
|
只有本站会员才能查看附件,请 登录

#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream infile( "1.txt" );
ofstream outfile( "2.txt" );
if( !infile || !outfile )
{
cerr << "open 1.txt error!\n";
return 1;
}
int b;
float a[62];
for(int i;float a[i];i++)
{
cin.get(a[i]);
b=a[i]*1000000;
outfile.put(b);
}
cout<<endl;
}
#include <fstream>
using namespace std;
int main()
{
ifstream infile( "1.txt" );
ofstream outfile( "2.txt" );
if( !infile || !outfile )
{
cerr << "open 1.txt error!\n";
return 1;
}
int b;
float a[62];
for(int i;float a[i];i++)
{
cin.get(a[i]);
b=a[i]*1000000;
outfile.put(b);
}
cout<<endl;
}
我的文本文件在附件中 希望大家帮忙 现在对文件流的处理没有什么问题 但是就是逻辑关系处理这有点乱
[ 本帖最后由 yumiao910 于 2013-5-24 11:24 编辑 ]