you have not coded the implementation of interval_since().
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Make it easy for yourself -- convert both time1 and time2 into minutes, subtract them and use the absolute value. No need for all those comparisons.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
almost
t1 = (time1.hour*60) * time1.minutes;
t2 = (time2.hour*60) + time2.minutes.
diff = abs(t2 - t1);
hours_in_interval = diff % 60;
minutes_in_interval = = diff/60;
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
That does not supprise me. You cannot just plunk the example code I posted into your program and expect it to compile. You will have to change it to fit in your program, or modify your program to use the code.
The prototype error means that there is a difference between what you put in the class and what you write in the implementation file. Both functions must match exactly (except for virtual keyword if it exists).
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
u have 2 b careful when using functions and classes becoz they change the program a lot as i have just found out. If the arguments 2 each function is not as it is defined it will not work. I hop this helps! :D
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439