#include <iostream>
#include <fstream>
#include <cstdlib>
using std::cout;
using std::cin;
using std::endl;
using std::cerr;
using std::ios;
using std::exit;
using std::ofstream;
int main()
{
ofstream outClientFile( "clients.dat", ios::out);
if( !outClientFile )
{
cerr << "File could not be opened" << endl; // Exit program if unable to create file.
exit(1);
}
cout << "Enter the account, name, and balance." << endl;
cout << "Enter end-of-file to end input. \n? " << endl;
int account;
char name[30];
int balance;
cin >> account >> name >> balance;
outClientFile << account << ' ' << name ' ' << balance;
cout << endl;
cout << "? ";
return 0;
}
/*NOTE...The error points to this line...outClientFile << account << ' ' << name ' ' << balance;????*/