I am having an issue invoking a leapYr function whereby I am to determine if the year entered is a leap year and what day number the date entered falls on. I am using C++ Dev compiler.
Anytime I think I am invoking the leapYr function within the dayNumber function I get an error that states I cannot use either of the 2 as functions. I am writing them as I have done other assignments and they worked just fine so I am not sure what I am doing wrong. Can anyone "guide" me to the area that is inaccurate so I can pinpoint it on my own? thanks
#include <iostream>
using namespace std;
void instruct()
{
//Enter a date as all integers to determine what number day of the year it is and i
cout << "Enter a date with a format x x xxxx as all integers to determine " << endl;
cout << "what day of the year it is as well as if the year is a leap year. " << endl << endl;
}
//end instruct
//Display the day number for the input date
cout << "The day number for " << Month << "/" << Day << "/" << Year << " is " << totalDays; cout << endl << endl;
Dev-C++ is bad blah blah blah upgrade to save your sanity: http://wxdsgn.sourceforge.net/?q=node/4
Now that that's out of the way, Your "LeapYr(...)" function returns a bool which you are trying to assign to integer datatypes "totalDays" and "dayNumber". Also this program isn't so complex that you've already run out of names, please change the name of your "dayNumber" variable inside of main(...) to something that doesn't match your "dayNumber" function.