Record Detail

Compile Error

/in/ex4.cpp: In function 'bool find_fish(int**, int**, int, int)':
/in/ex4.cpp:17:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
/in/ex4.cpp:15:33: error: unused parameter 'connect_map' [-Werror=unused-parameter]
 bool find_fish(int* connect_map[],int * pond[],int x,int y){
                                 ^
/in/ex4.cpp:15:46: error: unused parameter 'pond' [-Werror=unused-parameter]
 bool find_fish(int* connect_map[],int * pond[],int x,int y){
                                              ^
/in/ex4.cpp:15:52: error: unused parameter 'x' [-Werror=unused-parameter]
 bool find_fish(int* connect_map[],int * pond[],int x,int y){
                                                    ^
/in/ex4.cpp:15:58: error: unused parameter 'y' [-Werror=unused-parameter]
 bool find_fish(int* connect_map[],int * pond[],int x,int y){
                                                          ^
/in/ex4.cpp: In function 'int main()':
/in/ex4.cpp:23:18: error: ISO C++ forbids variable length array 'pond' [-Werror=vla]
     int pond[n][m];
                  ^
/in/ex4.cpp:23:18: error: ISO C++ forbids variable length array 'pond' [-Werror=vla]
/in/ex4.cpp:24:22: error: ISO C++ forbids variable length array 'fish_map' [-Werror=vla]
     int fish_map[n][m];
                      ^
/in/ex4.cpp:24:22: error: ISO C++ forbids variable length array 'fish_map' [-Werror=vla]
/in/ex4.cpp:25:22: error: ISO C++ forbids variable length array 'conn_map' [-Werror=vla]
     int conn_map[n][m];
                      ^
/in/ex4.cpp:25:22: error: ISO C++ forbids variable length array 'conn_map' [-Werror=vla]
/in/ex4.cpp:38:40: error: cannot convert 'int (*)[m]' to 'int**' for argument '1' to 'bool find_fish(int**, int**, int, int)'
             find_fish(conn_map,pond,i,j);
                                        ^
/in/ex4.cpp:24:9: error: unused variable 'fish_map' [-Werror=unused-variable]
     int fish_map[n][m];
         ^~~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Final Exam
Language
C++
Submit At
2022-08-02 15:44:47
Judged At
2022-08-06 15:10:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes