I need to write an application, which reads two times and finds out which time is later.
After that it calculates the time difference between these times and displays the
smaller (earlier) time and the time difference (duration)
I wrote most of the code below but still not working. Can I get some remarks of my errors please?
CODE:
#pragma once
#include <iostream>
#include <iomanip>
using namespace std;
class Time {
public:
Time diff(Time t2);
Time read(Time hrs, mins);
Time lessThan(Time time1, time2);
Time subtract(Time time1, time2);
Time display(Time duration);
What parameters does the function Time read(Time hrs, mins); accept? Those two parameters right there, what are they? Do they match the single parameter you;'re trying to use, "Enter time 1" ?
Put another one, is the parameter "Enter time 1" two parameters, the first begin a Time and the second being... well, nothing, what is mins? Your code just makes no sense.