/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:5:35: error: cast from 'void*' to 'char' loses precision [-fpermissive]
   char a=(char)malloc(sizeof(char));
                                   ^
foo.cc:33:48: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'int' [-Wformat=]
  printf("%s\n%d\n%d", stu[ll].a, stu[ll].g, sum);
                       ~~~~~~~~~                ^
foo.cc:13:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ~~~~~^~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2021-11-03 19:51:18
评测时间
2021-11-03 19:51:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes