Language: C++

#include <array>
#include <utility>
#include <iostream>
#include <algorithm>

using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::array;
using std::for_each;

using time = struct _time {int h,m,s;}; // type of time
using emp = pair<time,time>; // type of employee

time operator-(time t1,time t2) {
	time delta_time;
	int borrow = 0;
	delta_time.s = t1.s - t2.s;
	if (delta_time.s < 0) {
		delta_time.s += 60;
		borrow = 1;
	}
	delta_time.m = t1.m - t2.m - borrow;
	if (delta_time.m < 0) {
		delta_time.m += 60;
		borrow = 1;
	} else {
		borrow = 0;
	}
	delta_time.h = t1.h - t2.h - borrow;
	return delta_time;
}

int main() {
	array<emp,3> emps;
	for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
	for (auto e : emps) {
		time delta_time = e.second - e.first;
		cout << delta_time.h << " " << delta_time.m << " " << delta_time.s << endl;
	}
}

Compiler output:
a.cc:13:39: error: 'using time = struct _time' redeclared as different kind of entity
   13 | using time = struct _time {int h,m,s;}; // type of time
      |                                       ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc:14:27: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
   14 | using emp = pair<time,time>; // type of employee
      |                           ^
a.cc:14:27: note:   expected a type, got 'time'
a.cc:14:27: error: type/value mismatch at argument 2 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
a.cc:14:27: note:   expected a type, got 'time'
a.cc:16:1: error: 'time' does not name a type
   16 | time operator-(time t1,time t2) {
      | ^~~~
a.cc:5:1: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
    4 | #include <algorithm>
  +++ |+#include <ctime>
    5 | 
a.cc: In function 'int main()':
a.cc:36:15: error: 'emp' was not declared in this scope
   36 |         array<emp,3> emps;
      |               ^~~
a.cc:36:20: error: template argument 1 is invalid
   36 |         array<emp,3> emps;
      |                    ^
a.cc:37:23: error: request for member 'begin' in 'emps', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                       ^~~~~
a.cc:37:36: error: request for member 'end' in 'emps', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                    ^~~
a.cc:37:45: error: 'emp' is not a type
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                             ^~~
a.cc: In lambda function:
a.cc:37:62: error: request for member 'first' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                              ^~~~~
a.cc:37:75: error: request for member 'first' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                                           ^~~~~
a.cc:37:88: error: request for member 'first' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                                                        ^~~~~
a.cc:37:101: error: request for member 'second' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                                                                     ^~~~~~
a.cc:37:115: error: request for member 'second' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                                                                                   ^~~~~~
a.cc:37:129: error: request for member 'second' in 'e', which is of non-class type 'int'
   37 |         for_each(emps.begin(),emps.end(),[](emp &e){cin >> e.first.h >> e.first.m >> e.first.s >> e.second.h >> e.second.m >> e.second.s;});
      |                                                                                                                                 ^~~~~~
a.cc: In function 'int main()':
a.cc:38:23: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   38 |         for (auto e : emps) {
      |                       ^~~~
      |                       std::begin
In file included from /usr/include/c++/14/array:44,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:38:23: error: 'end' was not declared in this scope; did you mean 'std::end'?
   38 |         for (auto e : emps) {
      |                       ^~~~
      |                       std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:39:21: error: expected ';' before 'delta_time'
   39 |                 time delta_time = e.second - e.first;
      |                     ^~~~~~~~~~~
      |                     ;
a.cc:40:25: error: 'delta_time' was not declared in this scope
   40 |                 cout << delta_time.h << " " << delta_time.m << " " << delta_time.s << endl;
      |                         ^~~~~~~~~~