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
13858 Lê Minh Khánh Số nguyên không âm đẹp C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 537 2022-12-29 20:13:39

Lỗi biên dịch:

Main.c: In function ‘main’:
Main.c:20:2: error: unknown type name ‘hehe’; use ‘struct’ keyword to refer to the type
  hehe a[20];
  ^~~~
  struct 
Main.c:25:19: error: request for member ‘l’ in something not a structure or union
   scanf("%d",&a[i].l);
                   ^
Main.c:26:19: error: request for member ‘r’ in something not a structure or union
   scanf("%d",&a[i].r);
                   ^
Main.c:27:24: error: request for member ‘l’ in something not a structure or union
   int dem = count (a[i].l,a[i].r);
                        ^
Main.c:27:31: error: request for member ‘r’ in something not a structure or union
   int dem = count (a[i].l,a[i].r);
                               ^
Main.c:28:7: error: request for member ‘slsodep’ in something not a structure or union
   a[i].slsodep = dem;
       ^
Main.c:34:21: error: request for member ‘slsodep’ in something not a structure or union
   printf("%d\n",a[j].slsodep);
                     ^
Main.c:20:7: warning: variable ‘a’ set but not used [-Wunused-but-set-variable]
  hehe a[20];
       ^
Main.c:22:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ^~~~~~~~~~~~~~~