Problem minimum
User Water
Submission Time 2023-06-26 15:57:15
Score 0
Max Time N/A
Max Memory N/A

Compile Error

minimum.cpp: In function ‘int findMin(int, int*)’:
minimum.cpp:4:9: error: declaration of ‘int A [N]’ shadows a parameter
4 | int A[N];
| ^
minimum.cpp:5:6: error: conflicting declaration ‘int A [0]’
5 | int A[0]=min;
| ^
minimum.cpp:4:6: note: previous declaration as ‘int A [N]’
4 | int A[N];
| ^
minimum.cpp:7:11: error: invalid operands of types ‘int’ and ‘<unresolved overloaded function type>’ to binary ‘operator<’
7 | if (A[i]<min) {
| ~~~~^~~~
minimum.cpp:8:9: error: cannot resolve overloaded function ‘min’ based on conversion to type ‘int’
8 | A[i]=min;
| ^~~
minimum.cpp:11:9: error: cannot resolve overloaded function ‘min’ based on conversion to type ‘int’
11 | return min;
| ^~~
minimum.cpp:12:12: error: a function-definition is not allowed here before ‘{’ token
12 | int main() {
|