You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

22 lines
556 B
C++

#pragma once
#include <string_view>
#include <iostream>
#include <vector>
using std::string_view, std::vector;
class Time {
private:
int mHours = 0, mMinutes = 0, mSeconds = 0;
public:
Time(int hours, int minutes, int seconds);
Time();
Time(string_view s);
Time operator+(Time b) const;
int hours() const; int minutes() const; int seconds() const;
friend std::ostream& operator<<(std::ostream& out, Time t);
};
Time sumTimes(const vector<Time>& v);
vector<Time> getTimesFromString(string_view s);