I need to set a limit for the Date in Visual C++. For example, the date ranging from May 2010 to May 2012. Can anybody help me to find a solution for this.
Why this post is down voted. Now I am not able to ask questions. Please help me to activate my account.
Thanks in advance
That’s not how programming works. You don’t create or customize a date object (what are you using, anyway?
time_t?) for every need.You get the date, you check what the user entered, and you either accept or reject it (in which case you would prompt the user to correct their input). It’s called validation.