hi everyone can someone tell me what is the problem of this code...
Code:
#include <iostream>
#include <cstdlib>
#include "date.h"
using namespace std;
int NextSatVal(Date& today);
int main()
{
int d, m, y;
cout<<"Enter: ";
cin>>d>>m>>y;
Date today(m, d, y);
NextSatVal(Date& today);
system("pause");
return 0;
}
int NextSatVal(Date& today)
{
while(today.Month() != 2 && today.Day() != 14 && today.DayName() != "Saturday")
{
today++;
}
return today.year();
}
my aim of this code is to find the next valentine in saturday.
thank you