koala.cpp: In function 'int greaterValue(int, int)':
koala.cpp:51:20: error: conflicting declaration 'int r'
51 | int l = 1, r = 11;
| ^
koala.cpp:49:13: note: previous declaration as 'int r [n]'
49 | int r[n];
| ^
koala.cpp:52:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
52 | while (r - l > 1)
| ~~~~~~^~~
koala.cpp:54:35: error: invalid operands of types 'int*' and 'int' to binary 'operator>>'
54 | int mid = (l + r) >> 1;
| ~~~~~~~ ^~ ~
| | |
| int* int
koala.cpp:60:27: error: incompatible types in assignment of 'int' to 'int [n]'
60 | r = mid;
| ~~^~~~~
koala.cpp: In function 'int minValue(int, int)':
koala.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
20 | }
| ^
koala.cpp: In function 'int greaterValue(int, int)':
koala.cpp:64:1: warning: control reaches end of non-void function [-Wreturn-type]
64 | }
| ^