#include <iostream>
#include <ctime>
using namespace std;
const unsigned long SecondsPerDay = 86400;
void DateToDays(int day, int month, int year, int& days)
{
tm temp;
temp.tm_sec = 0;
temp.tm_min = 0;
temp.tm_hour = 12;
temp.tm_mday = day ;
temp.tm_mon = month - 1;
temp.tm_year = year -1900;
days = mktime(&temp)/SecondsPerDay ;
}
int main()
{
int days1;
int days2;
int diff_days;
DateToDays(22, 11, 2008, days1);
DateToDays(11, 3, 2005, days2);
diff_days = abs(days1 - days2);
cout < <"days between the two date is " < <diff_days < <'/n';
return 0;
}