olatzcelaya
Programmer
HI everyone,
I need your help in the error that this code gives me:
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
int main ()
{
ofstream outClientFile ( "clients.dat", ios:ut ) ;
if (!outClientFile)
{
cerr << "File could not be opened" << endl;
exit (1);
}
cout << "Enter the account, name, and balance.\n " ;
int account;
char name [30];
float balance;
while ( cin >> account >> name >> balance )
{
outClientFile << account << ' ' << name << ' ' << balance << '\n' ;
cout << "?";
}
return 0;
}
The error is the following one and appears in the lines of the include:
C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from .\Mis documentos\Practicas C\sequential access file.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from ../Mis documentos/Practicas C/sequential access file.cpp
Could anybody tell me why this error appears????? Any help will be appreciated.
Thanks a lot,
Olatz
I need your help in the error that this code gives me:
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
int main ()
{
ofstream outClientFile ( "clients.dat", ios:ut ) ;
if (!outClientFile)
{
cerr << "File could not be opened" << endl;
exit (1);
}
cout << "Enter the account, name, and balance.\n " ;
int account;
char name [30];
float balance;
while ( cin >> account >> name >> balance )
{
outClientFile << account << ' ' << name << ' ' << balance << '\n' ;
cout << "?";
}
return 0;
}
The error is the following one and appears in the lines of the include:
C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from .\Mis documentos\Practicas C\sequential access file.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from ../Mis documentos/Practicas C/sequential access file.cpp
Could anybody tell me why this error appears????? Any help will be appreciated.
Thanks a lot,
Olatz