![]() |
| ||
| Beginner and I would love help :) date validation hello! I need a program that validates the imput of dates. (Checks for leap years etc.) The user enters: mm/dd/yyyy The problem is, I have trouble with complex programs. I came up with this program, but i know it's too basic for what she wants. I need to have arrays in there, but i don't know how. I would love any help considering I'm bad at understanding this subject. :) could someone help me ???!!! bool GoodDate(int month,int day,int year) |
| ||
| Re: Beginner and I would love help :) date validation Let me give you this hint - since several of the months have the same behavior - ie 1,3,5,7,8,10,12 are all 31 days, while 4,6,9,11 are all 30 days, then you could easily use a 'switch' statement on your month and not have to repeat all of that logic. |
| ||
| Re: Beginner and I would love help :) date validation okay I came up with something a little more complex, but it's still not working. I know it's somewhere within my functions (either the bools or whatnot)......basically it's not telling them they entered an invalid date. Any help?? I didn't put it in there, because I can't figure out where it goes logically. / ************************Includes**************************************/ |
| ||
| Re: Beginner and I would love help :) date validation put ur whole code so I can find the problem I did the same thing last week for my assignment. |
| ||
| Re: Beginner and I would love help :) date validation These examples are overly complicated. I found a simple one that totally handles leap years. from: c++ checkdate date validation bool checkdate(int m, int d, int y) |
| ||
| Re: Beginner and I would love help :) date validation A few years late, blacklight? |
| All times are GMT -4. The time now is 4:44 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC