Greetings,
There are a few typographical and syntax issues with your program. Firstly, lets look at the minor issues:
Point A I'm guessing that
update should be
udate, hence the class.
Point B
In your operator overload function
operator++() one of your if statements have a slight issue:
if(year%4==0 && day==29)||(year%4!=0 && day==28))
As seen, you open a pararenthesis and close it. Open another and then close two. We can simple fix this by adding a parenthesis in the beginning of the
if statement:
if((year%4==0 && day==29)||(year%4!=0 && day==28))
So far this has worked, and your program compiled just fine after this. Without using the
[code] [/code] tags it was difficult for me to see if your programs
if/else statements were properly called, though it seemed fine once I tabbed things over in my compiler. If you have further questions, please feel free to ask.
I hope this helps,
-
Stack
Overflow