dateClass program

hello can u help me with this program please :

Build a DateType class with day/month/year format.

Do not forget that :
days : 1-31 (for months: 1,3,5,7,8,10,12), 1-30 (for months: 4,6,9,11),
1-28 (for month: 2) if year is not divided by 4
1-29 (for month: 2) if year is divided by 4
months: 1-12
years: >=2000
default date: 1/1/2000.

I appreciate your help.
I know that this may sound a bit rude, but first try writing it yourself and ask when you get stuck. The only way to learn programming is by coding. Coding teaches things that books can't teach you. Edit: For a good date class for beginners refer to chapter 9 of "Programming -- Principles and Practice Using C++" by Bjarne Stroustrup.
Last edited on
yeah i know and i swear i tried but the problem is that i dont know how to write the if statment for (day,month,year)
Search online for a Date class in C++, I'm sure you'll get the idea. It's never easy to start a project, even for experienced programmers, because there are a lot of was of going at a problem.
thank you benbalach
Topic archived. No new replies allowed.