Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
#include <algorithm>
using namespace std;

int time[60*60*24];
	
int main(void){
	int n;
	while(cin >> n,n){
		for(int i=0;i<60*60*24;i++)
			time[i]=0;
		for(int j=0;j<n;j++){
			string l,a;
			cin >> l >> a;
			int lh=atoi(l.substr(0,2).c_str());
			int lm=atoi(l.substr(3,2).c_str());
			int ls=atoi(l.substr(6,2).c_str());
			int ah=atoi(a.substr(0,2).c_str());
			int am=atoi(a.substr(3,2).c_str());
			int as=atoi(a.substr(6,2).c_str());
			int from=lh*60*60+lm*60+ls;
			int to=ah*60*60+am*60+as;
			for(int i=from;i<to;i++)
				time[i]++;
		}
		int cmax=0;
		for(int i=0;i<60*60*24;i++)
			cmax=max(cmax,time[i]);
		cout << cmax << endl;
	}
	return 0;
}

Compiler output:
a.cc:7:18: error: 'int time [86400]' redeclared as different kind of entity
    7 | int time[60*60*24];
      |                  ^
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:1:
/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: In function 'int main()':
a.cc:13:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   13 |                         time[i]=0;
      |                               ^
a.cc:13:32: error: assignment of read-only location '*(time + ((sizetype)i))'
   13 |                         time[i]=0;
      |                         ~~~~~~~^~
a.cc:26:39: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   26 |                                 time[i]++;
      |                                       ^
a.cc:26:39: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} [-Wpointer-arith]
   26 |                                 time[i]++;
      |                                 ~~~~~~^
a.cc:26:39: error: lvalue required as increment operand
   26 |                                 time[i]++;
      |                                       ^
a.cc:30:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   30 |                         cmax=max(cmax,time[i]);
      |                                             ^
a.cc:30:33: error: no matching function for call to 'max(int&, time_t (&)(time_t*) noexcept)'
   30 |                         cmax=max(cmax,time[i]);
      |                              ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:30:33: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'})
   30 |                         cmax=max(cmax,time[i]);
      |                              ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:30:33: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   30 |                         cmax=max(cmax,time[i]);
      |                              ~~~^~~~~~~~~~~~~~