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 |
19896 |
Phan Anh Duy |
Chọn cạnh tam giác |
C/C++ |
Lỗi biên dịch (CE) |
0 MS
|
0 KB
|
695 |
2023-02-25 19:36:03 |
Lỗi biên dịch:
Main.cc: In function ‘int main()’:
Main.cc:11:20: error: invalid conversion from ‘void*’ to ‘int*’ [-fpermissive]
int *a = malloc(n * sizeof(int));
~~~~~~^~~~~~~~~~~~~~~~~
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:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~