foo.cc: In function 'll get_value(char*)':
foo.cc:20:20: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
20 | for (int i = 0; i < strlen(s); i++)
| ~~^~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:41:11: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[20]' [-Wformat=]
41 | scanf("%s", &a[i].s);
| ~^ ~~~~~~~
| | |
| | char (*)[20]
| char*
foo.cc:29:12: warning: unused variable 'k' [-Wunused-variable]
29 | int i, j, k;
| ^
foo.cc:37:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
37 | scanf("%d %s", &n, str);
| ~~~~~^~~~~~~~~~~~~~~~~~
foo.cc:41:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
41 | scanf("%s", &a[i].s);
| ~~~~~^~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务