Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
271743 Võ Anh Kiệt HUTECH IT OFFICE TOUR C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 818 2023-11-21 09:45:57

Lỗi biên dịch:

Main.cc: In function ‘int nhap(int, int, int, int*)’:
Main.cc:35:12: error: a function-definition is not allowed here before ‘{’ token
 int main() {
            ^
Main.cc:43:1: error: expected ‘}’ at end of input
 }
 ^
Main.cc: In function ‘void nhapn(int&, int&, int&)’:
Main.cc:7:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&n);
     ~~~~~^~~~~~~~~
Main.cc:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&k);
     ~~~~~^~~~~~~~~
Main.cc:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&han);
     ~~~~~^~~~~~~~~~~
Main.cc: In function ‘void nhapm(int&, int*)’:
Main.cc:15:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a[i]);
         ~~~~~^~~~~~~~~~~~
Main.cc: In function ‘int nhap(int, int, int, int*)’:
Main.cc:43:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^