关于简单处理文本中 所有数都乘以10000 为什么我的程序总是报错


#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; }
我的文本文件在附件中 希望大家帮忙 现在对文件流的处理没有什么问题 但是就是逻辑关系处理这有点乱
[ 本帖最后由 yumiao910 于 2013-5-24 11:24 编辑 ]