I have a C++ application I'm developing where I just need to check if the current day's date is in a char array, specifically in the format "2015-05-10". I'm pretty new to C++ coming over from PHP where it is very easy to do, but I'm struggling trying to find a good method in C++. This needs to be automated as the script runs daily on a cron job. So the process is:
If (today's date is in char array) {
do this }
else {
do nothing
}
Edit: I am obviously useless at expressing my problems, sorry!
My main issues are:
How do I get the current day's date in a nice simple string in this format - 2015-05-10
How do I then check if a char array I have stored (which I know contains a date amongst some other text) contains the current day's date (which I will, when I know how, have stored as a string).