新手提问,将数据写入文件没效果
程序代码:
#include<fstream> using namespace std; int main() { double income=123.45,expenses=987365; int week=7,year=2013; ofstream outfile("D\\a.txt",ios::out); outfile<<"income="<<income<<"expenses="<<expenses<<endl; outfile<<"week="<<week<<"year="<<year<<endl; outfile.close(); }[local]1[/local]