Hello
My problem is I am calling a method in my main but this method doesn't have any code written in it, and yet I am getting an output of numbers approximately 10 digits long, and a negative value.
For example, in my main I have:
Date d1(9,20,2011); // Date is an object that requires a month,day,and year
Date d2(10,1,2011);
cout << d1.dayDifference(d4) << endl;
Then in my .cpp for the dayDifference method I have written:
int Date::dayDifference(const Date& d) const
{
//lots of commented out code
}
My Date object works fine, I overloaded the pre-increment and post-increment operators, and those work fine too, and I have around 20 methods I wrote that use all of this, and yet this dayDifference method, when called, outputs a long negative number. And when I wrote in the code for that method "cerr << help; ", It then outputted the word "help" along with a long positive number.
The output is the same number each time I run it, but it shouldn't be outputting anything since there is no code inside.
Thanks for your help, and I will happily clarify anything