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)提供评测服务