Hello people.
I am pretty new to C++, but not very new to coding. I would like to have a C++ program do something at a certain date and time. I currently have the code:
Im getting an error saying i cannot compare the two, or there is no room for operator== in that statement. I just need to get the time, and say... if its a certian time, do something. Can anyone help?
I am pretty new to C++, but not very new to coding. I would like to have a C++ program do something at a certain date and time. I currently have the code:
Code:
#include <cstdlib>
#include <iostream>
using namespace std;
string timee;
int main()
{
timee="Sun 09/03/2006";
if (system("date /t")==timee)
{
cout<<"I win.\n";
}
cout<<timee;
system("pause");
return 0;
}
Comment