Write your question here.
I'm trying to have the overloaded postfix operator make day = 1 whenever its day 365 the first snipped is me creating the prototype, and the second snippet is the actual code definition, i can't seem to figure this out. Any help would be appreciated.
Are you absolutely sure you didn't mean if(day == 365) ? Because if(day = 365) sets day equal to 365, and always evaluates to true. Looking at your code, I'm pretty sure that's not what you intended.
Can you tell us what problem it is that you're actually seeing? We can't help you if you don't tell us what it is you need help with.
basically the program asks the user what day of the year do they want the date for.
so the day could be 364 which would be December 30.
I want the ++ operator to bring the day back to day 1 whenever I use it to increment objects that's day is 365. If the object isn't 365 I just want it to increment by 1 day
whenever I change it to if(day == 365)
it does the same thing, it still increments by one, but I end up with 366, not 1.