I'm taking the time from an accessor function and if it's from 0-9, so it displays correctly the hour time position, I have the following statements in my main body:
if (clock1.getHour() == 00)
cout<<"The hour of clock1 is 00"<<endl;
else if (clock1.getHour() == 01)
cout<<"The hour of clock1 is 01"<<endl;
else if (clock1.getHour() == 02)
cout<<"The hour of clock1 is 03"<<endl;
... ... .... ...
else if (clock1.getHour() == 08)
cout<<"The hour of clock1 is 08"<<endl;
else if(clock1.getHour() == 09)
cout<<"The hour of clock1 is 09"<<endl;
else
cout<<"The hour of clock1 is "<<clock1.getHour()<<endl;
This works great and it displays, except when I get to 8 and 9. I get two errors, invalid digit "8" & "9" in octal constant. They also don't appear in purple as the rest of the ints do in else if statements, just black.
The syntax is exactly the same as the rest of the statements. I don't get why it would all of the sudden act up now. If I comment them out, it runs.
Thanks.