Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;
int time[100];
int cmp(int x,int y)
{
    if(x>y)
        return y;
    return x;
}
int main()
{
    int a,b,c;
    scanf("%d%d%d",&a,&b,&c);
    time[0]=a+b;
    time[1]=a+c;
    time[2]=b+c;
    printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
    return 0;
}


Compiler output:
a.cc:4:13: error: 'int time [100]' redeclared as different kind of entity
    4 | int time[100];
      |             ^
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:2:
/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:15:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   15 |     time[0]=a+b;
      |           ^
a.cc:15:12: error: assignment of read-only location '* time'
   15 |     time[0]=a+b;
      |     ~~~~~~~^~~~
a.cc:16:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   16 |     time[1]=a+c;
      |           ^
a.cc:16:12: error: assignment of read-only location '*(time + 1)'
   16 |     time[1]=a+c;
      |     ~~~~~~~^~~~
a.cc:17:11: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   17 |     time[2]=b+c;
      |           ^
a.cc:17:12: error: assignment of read-only location '*(time + 2)'
   17 |     time[2]=b+c;
      |     ~~~~~~~^~~~
a.cc:18:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                             ^
a.cc:18:41: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                                         ^
a.cc:18:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                                                 ^
a.cc:18:41: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                                   ~~~~~~^
      |                                         |
      |                                         time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:5:13: note:   initializing argument 1 of 'int cmp(int, int)'
    5 | int cmp(int x,int y)
      |         ~~~~^
a.cc:18:49: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                                           ~~~~~~^
      |                                                 |
      |                                                 time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:5:19: note:   initializing argument 2 of 'int cmp(int, int)'
    5 | int cmp(int x,int y)
      |               ~~~~^
a.cc:18:29: error: invalid conversion from 'time_t (*)(time_t*) noexcept' {aka 'long int (*)(long int*) noexcept'} to 'int' [-fpermissive]
   18 |     printf("%d\n",cmp(time[0],cmp(time[1],time[2])));
      |                       ~~~~~~^
      |                             |
      |                             time_t (*)(time_t*) noexcept {aka long int (*)(long int*) noexcept}
a.cc:5:13: note:   initializing argument 1 of 'int cmp(int, int)'
    5 | int cmp(int x,int y)
      |         ~~~~^