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
269447 Nguyễn Huy Hoàng Luỹ thừa bậc 5 C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 549 2023-11-18 21:31:25

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:21:16: error: invalid conversion from ‘unsigned int*’ to ‘int*’ [-fpermissive]
   nhap_mang(a,n);
                ^
Main.cc:5:6: note:   initializing argument 1 of ‘void nhap_mang(int*, int)’
 void nhap_mang(int a[], int n) {
      ^~~~~~~~~
Main.cc:22:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = 0; i < n; i++) {
                  ~~^~~
Main.cc: In function ‘void nhap_mang(int*, int)’:
Main.cc:7:8: 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 main()’:
Main.cc:19:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~