|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
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... |
|
#2
|
||||
|
||||
|
NM I GOT IT..should have been ofstream..
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > fstream issues |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|