My compiler told me what was wrong, doesn't yours do the same?
My compiler told me what was wrong, doesn't yours do the same?
His did if you've read the first post carefully. He did not understand. Got it.
While you're breakin' down my back n'
I been rackin' out my brain
It don't matter how we make it
'Cause it always ends the same
You can push it for more mileage
But your flaps r' wearin' thin
And I could sleep on it 'til mornin'
But this nightmare never ends
Don't forget to call my lawyers
With ridiculous demands
An you can take the pity so far
But it's more than I can stand
'Cause this couchtrip's gettin' older
Tell me how long has it been
'Cause 5 years is forever
An you haven't grown up yet
-- You Could Be Mine - Guns N' Roses
elad: I did all that before I posted my thread. And with my original codes (all ofstream's, see posts above), this line gives the error:
And yup, I have succeded output member by member like thisCode:ofstream &operator<<(ofstream& stream, const Student& s) { stream << s.getEnrollDate() << '|' // error return stream; }
But, I thought since I overloaded "<<" for Date object, then I could utilize my first method.Code:stream << s.EnrollDate.month << '|' << s.EnrollDate.day << '|' << s.EnrollDate.year << '|'
lyx: mine said
EDIT: I got the solution that I needed already, so thanks to all of you guys.E:\jDocument\CSCI\231\no1\Student.cpp(354) : error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'const class Date' (or there is no acceptable conversion)
PS. I promise I will give credit for you on my codes
Last edited by alphaoide; 09-30-2003 at 10:00 AM.
In fact, it isn't what I mean, my compiler told me that it was an ostream and not a ofstream, so I understood.