I\'m trying to write a Date class in an attempt to learn C++.
I\'m trying to find an algorithm to add or subtract days to a date, where Day starts from 1 and Month s
I would suggest writing first a routine which converts year-month-day into a number of days since fixed date, say, since 1.01.01. And a symmetric routine which would convert it back.
Don't forget to process leap years correctly!
Having those two, your task would be trivial.