foo.cc: In function 'int main()':
foo.cc:9:25: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} [-Wformat=]
9 | scanf("%d%d%d%d%d%d", &name, &s1, &s2, &a, &b, &x);
| ~^ ~~~~~
| | |
| int* std::string* {aka std::__cxx11::basic_string<char>*}
foo.cc:9:31: warning: format '%d' expects argument of type 'int*', but argument 5 has type 'char*' [-Wformat=]
9 | scanf("%d%d%d%d%d%d", &name, &s1, &s2, &a, &b, &x);
| ~^ ~~
| | |
| int* char*
| %hhd
foo.cc:9:33: warning: format '%d' expects argument of type 'int*', but argument 6 has type 'char*' [-Wformat=]
9 | scanf("%d%d%d%d%d%d", &name, &s1, &s2, &a, &b, &x);
| ~^ ~~
| | |
| int* char*
| %hhd
foo.cc:11:31: error: 'score2' was not declared in this scope
11 | if(s1 > 85 && score2 > 80) sum += 4000;
| ^~~~~~
foo.cc:16:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
16 | if(sum > maxx) maxn = name, maxx = sum; sum = 0;
| ^~
foo.cc:16:57: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
16 | if(sum > maxx) maxn = name, maxx = sum; sum = 0;
| ^~~
foo.cc:18:18: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::string' {aka 'std::__cxx11::basic_string<char>'} [-Wformat=]
18 | printf("%d\n%d\n%d\n", maxn, maxx, tot);
| ~^
| |
| int
[Hydro](https://hydro.ac)提供评测服务