Mã chấm: 272297
Main.cc:69:27: error: stray ‘#’ in program if (dem1 > dem2 && dem1 #include ^ Main.cc: In function ‘int sosanh(int, int)’: Main.cc:46:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Main.cc: In function ‘int main()’: Main.cc:69:7: warning: init-statement in selection statements only available with -std=c++1z or -std=gnu++1z if (dem1 > dem2 && dem1 #include ^~~~ Main.cc:69:28: error: expected ‘;’ before ‘include’ if (dem1 > dem2 && dem1 #include ^~~~~~~ Main.cc:69:19: warning: statement has no effect [-Wunused-value] if (dem1 > dem2 && dem1 #include ~~~~~~~~~~~~^~~~~~~ Main.cc:71:59: warning: declaration of ‘int nam(int*, int, int, int&, int&)’ has ‘extern’ and is initialized int nam(int arr[] , int n , int nam ,int &dem1 , int &dem3) ^ Main.cc:73:9: error: expected ‘}’ before ‘;’ token dem1 =0; ^ Main.cc:73:9: error: function ‘int nam(int*, int, int, int&, int&)’ is initialized like a variable Main.cc:73:9: error: expected ‘)’ before ‘;’ token Main.cc:73:9: warning: the address of ‘int nam(int*, int, int, int&, int&)’ will never be NULL [-Waddress] Main.cc:80:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if (dem1 == nam ) ^~~ Main.cc:82:4: error: ‘dem3’ was not declared in this scope dem3 = dem1; ^~~~ Main.cc:82:4: note: suggested alternative: ‘dem2’ dem3 = dem1; ^~~~ dem2 Main.cc: In function ‘int sosanh(int, int)’: Main.cc:108:5: error: redefinition of ‘int sosanh(int, int)’ int sosanh(int dem1 , int dem2) ^~~~~~ Main.cc:38:5: note: ‘int sosanh(int, int)’ previously defined here int sosanh(int dem1 , int dem2) ^~~~~~ Main.cc:116:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ Main.cc: In function ‘int main()’: Main.cc:117:5: error: redefinition of ‘int main()’ int main() ^~~~ Main.cc:47:5: note: ‘int main()’ previously defined here int main() ^~~~ Main.cc:133:31: error: too many arguments to function ‘int nam(int*, int, int, int&)’ nam(arr , n , x , dem1 , dem3); ^ Main.cc:3:5: note: declared here int nam(int arr[] , int n , int nam ,int &dem1 ) ^~~ Main.cc: At global scope: Main.cc:149:2: error: ‘x’ does not name a type }x &&dem2 >=y) ^ Main.cc:152:3: error: expected unqualified-id before ‘else’ }else if (dem1 <= dem2 && dem1 >=x &&dem2 >=y) ^~~~ Main.cc:156:1: error: expected declaration before ‘}’ token } ^ Main.cc: In function ‘int nam(int*, int, int, int&)’: Main.cc:18:2: warning: control reaches end of non-void function [-Wreturn-type] }} ^ Main.cc: In function ‘int nu(int*, int, int, int&)’: Main.cc:36:2: warning: control reaches end of non-void function [-Wreturn-type] }} ^ Main.cc: In function ‘int nu(int*, int, int, int&, int&)’: Main.cc:106:2: warning: control reaches end of non-void function [-Wreturn-type] }} ^