#include<iostream>
#include<string>
#include<fstream>
#include<cstdlib>
using namespace std;
int main()
{
ofstream outClientFile("client.txt", ios::out);
if (!outClientFile)
{
cerr << "file could not be opened" << endl;
exit(EXIT_FAILURE);
}
cout << "Enter the account, name, and balance." << endl
<< "enter end-of-file to end input.\n? ";
int account;
string name;
double balance;
while (cin >> account >> name >> balance)
{
outClientFile << account << ' ' << name << ' ' << balance << endl;
cout << "? ";
}
}
11-02
11-02