Hi, Iam trying to compare to random dates/times but am unable to create 2 independent times as it wont let me decalre 2 individual time_t variables, it will just overight the first variable with the second one.
Is it not possible to create 2 indivudual random dates/time based on systemtime modify one and the other is not changed?
If it is possible could someone tell me how I am to initialise it correctly, as at the momoent I am using:
using namespace std;
time_t time1 = time(NULL);
time_t time2 = time(NULL) + (a constant);
tm *ltime1 = gmtime(&time1);
tm *ltime = gmtime(&time2);