So I’m trying to find out if the current date on a Windows machine is after a hardcoded date. How would I go about doing this without using Boost or ATL? I’m using Visual Studio 2010 C++
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The platform independent way to get the current date in C++ is
time(NULL), which returns seconds since Jan 1, 1970. You can use other routines in ctime to either turn that into a string, pull out day/month/year/etc.