
April 22nd, 2003, 10:41 PM
|
 |
Contributing User
|
|
Join Date: Nov 2002
Posts: 421
Time spent in forums: 15 h 46 m 21 sec
Reputation Power: 11
|
|
|
fstream issues
It keeps giving me an error where I bolded the text..Im trying to input the value of num to num.dat. The error is this:
error C2676: binary '<<' : 'class std::basic_ifstream<char,struct std::char_traits<char> >' does not define this operator or a conversion to a type acceptable to the
predefined operator
HELP? Code:
mydata.open("mydata.dat", ios::app);
if (mydata)
{
mydata << num << ". " << names << "\n" << address << "\n" << city << "\n" << state << "\n" << zip << "\n\n";
mydata.close();
num++;
count.open("num.dat", ios:  ut);
if (count)
{
count << num;
count.close();
}
}
else
{
cout << "error!";
}
}
__________________
hmmm...
|