Record Detail

Compile Error

/in/ex4.cpp: In function 'int main(int, char**)':
/in/ex4.cpp:8:16: error: comparison with string literal results in unspecified behavior [-Werror=address]
  if(argv[1] == "./ex4--help"){
                ^~~~~~~~~~~~~
/in/ex4.cpp:11:21: error: comparison with string literal results in unspecified behavior [-Werror=address]
  else if(argv[1] == "./ex4 -count"){
                     ^~~~~~~~~~~~~~
/in/ex4.cpp:14:21: error: comparison with string literal results in unspecified behavior [-Werror=address]
  else if(argv[1] == "./ex4 -name"){
                     ^~~~~~~~~~~~~
/in/ex4.cpp:17:21: error: comparison with string literal results in unspecified behavior [-Werror=address]
  else if(argv[1] == "./ex4 -detail"){
                     ^~~~~~~~~~~~~~~
/in/ex4.cpp:20:21: error: comparison with string literal results in unspecified behavior [-Werror=address]
  else if(argv[1] == "./ex4-help"){
                     ^~~~~~~~~~~~
/in/ex4.cpp:23:21: error: comparison with string literal results in unspecified behavior [-Werror=address]
  else if(argv[1] == "./ex4"){
                     ^~~~~~~
/in/ex4.cpp: In function 'int count()':
/in/ex4.cpp:37:1: error: expected ';' before '}' token
 }
 ^
/in/ex4.cpp:37:1: error: no return statement in function returning non-void [-Werror=return-type]
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Exercise 4
Language
C++
Submit At
2022-10-21 23:48:29
Judged At
2022-10-22 19:08:48
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes