well that sort of works..
(a) you still have a junk code calculating the number of days.
(b) you have functions that return values BUT don't your compiler should tell you about that. -- NEVER allow warnings to go through.
(c) Think about what happens if day==31 in putEntry.
(d) you are forgetting in several places that C++ arrays count from zero and not 1.