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
98756 Axe GHÉP ĐOẠN MÃ C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 559 2023-05-26 14:51:00

Lỗi biên dịch:

Main.cc: In function ‘int sosanh(const void*, const void*)’:
Main.cc:5:18: error: cast from ‘const void*’ to ‘int’ loses precision [-fpermissive]
     return ((int)a - (int)b);
                  ^
Main.cc:5:27: error: cast from ‘const void*’ to ‘int’ loses precision [-fpermissive]
     return ((int)a - (int)b);
                           ^
Main.cc: In function ‘int main()’:
Main.cc:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
     ~~~~~^~~~~~~~~~
Main.cc:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d", &m[i]);
         ~~~~~^~~~~~~~~~~~~