The codes above gave me this error.Code:#include <fstream>
using std ofstream;
.
.
.
ofstream &operator<<(ofstream& stream, const Date& d){
stream << d.getMonth() << '|' //error found here
<< d.getDay() << '|'
<< d.getYear() << '|';
return stream;
}
What's weird is when I change all "ofstream" to "ostream" and change to appropriate "include" and "using", it compiles fine.Quote:
e:\jdocument\csci\231\no1\date.cpp(132) : error C2666: '<<' : 13 overloads have similar conversions
So, any idea..???