标题:[求助]书上的源程序,编译出错!
取消只看楼主
sbivfh
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-1-2
 问题点数:0 回复次数:0 
[求助]书上的源程序,编译出错!

#include<iostream>
#include<fstream>
using namespace std;
int main()
{
char filename[20];
cout<<"enter name for new files:";
cin>>filename;
ofstream fout (filename);
fout<<"for only your eyes!\n";
cout<<"Enter your secret number:";
float secret;
cin>>secret;
fout<<"your secret numbers is "<<secret<<"\n";
fout.close();
ifstream fin(filename);
cout<< "Here are the corrects of "<<filename<<":\n";
char ch;
while(fin.get(ch))
cout<<ch;
cout<<"done!";
fin.close();
return 0;
}


[此贴子已经被作者于2007-1-9 13:07:02编辑过]

搜索更多相关主题的帖子: 编译 
2007-01-09 12:55



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-115045-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.096270 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved