I want to create a class of date,,in which there is a member function checker which checks the month no. if the month is 1 then its has max 31 days,, for 2 month leap year etc,, i know what i want to do but i dun know how to implement this,, kindly help me using switch case,,!!
It may be easier to create an array of the number of days in each month of the year, and just check based on that. You could handle February separately to account for leap years.