【请教】这几个语句什么意思
#include<iostream>
#include<fstream>
int main()
{
using namespace std;
char automobile[50];
int year;
double a_price;
double d_price;
ofstream outFile;
outFile.open("carinfo.txt");
cout<<"enter*********automobile:";
cin.getline(automobile,50);
cout<<"enter******year:";
cin>>year;
cout<<"enter****price:";
cin>>a_price;
d_price=0.913*a_price;
outFile<<fixed;
outFile.precision(2);
outFile.setf(ios_base::showpoint);//这里没有定义fixed啊 ,还有就是下面的两个语句什么作用,
outFile<<"make and model:"<<automobile<<endl;
outFile<<"year:"<<year<<endl;
outFile<<"was asking $:"<<a_price<<endl;
outFile<<"now asking$:"<<d_price<<endl;
return 0;
}//他也生成了文本怎么从make and model开始就只生成在所创建的carinfo.txt,而不在屏幕上显示啊
[此贴子已经被作者于2007-7-19 10:44:31编辑过]