Good afternoon,
Does anyone know whether it's possible to have more than one overloaded ostream in a class?
This is for a time class that i've created however it ouputs data like this 12:12:12:AM, i'd like to use the same ostream operator to output military time 14:12:12, however when I use the ostream operator to output, I'm getting 14:12:12 0. I'd like not to have the extra zero for the military time.
Thank you
ostream &operator <<( ostream& retOut, const TimeClass ®time)
{
retOut << setfill( '0' ) << setw( 2 )<< regtime.hours<<":"<< setw( 2 )<<regtime.mins<<":"<< setw( 2 )<<regtime.secs<<" "<<regtime.ap<<endl ;
return retOut;
}