overload operator ++ in a vector

Pages: 12
Okay so now you've created the class Date you need to create an instance of it.
This is like saying you've created the concept of a Date, now you need to make a Date.

This is actually simpler than it sounds. To create a date you simply write
Date name_of_date;
You can then call
++name_of_date;
to increment the date. However as you have no constructor or 'get' and 'set' functions there's no knowing what name_of_date's values will be.

And in answer to your final question yes, though you may need to write int unused in the definition
Ok, thanks a lot.Tonight I will write the whole code (I hope).
Topic archived. No new replies allowed.
Pages: 12