foo.cc:8:5: error: 'int index' redeclared as different kind of entity
8 | int index = -1;
| ^~~~~
In file included from /nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/string.h:462,
from /nix/store/r0n0bpr0s38f02hyg0akd63yxc1d2n86-gcc/include/c++/12.3.0/cstring:42,
from foo.cc:3:
/nix/store/y8wfrgk7br5rfz4221lfb9v8w3n0cnyd-glibc-2.37-8-dev/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
foo.cc: In function 'void row()':
foo.cc:23:35: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
23 | if (index == -1) {
| ~~~~~~^~~~~
foo.cc:24:41: error: overloaded function with no contextual type information
24 | index = i;
| ^
foo.cc: In function 'void queue()':
foo.cc:46:35: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator=='
46 | if (index == -1) {
| ~~~~~~^~~~~
foo.cc:47:41: error: overloaded function with no contextual type information
47 | index = i;
| ^
foo.cc: In function 'int main()':
foo.cc:61:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
61 | scanf_s("%d", &matrix[i][j]);
| ^~~~~~~
| scanf
foo.cc:65:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator!='
65 | if (index != -1) {
| ~~~~~~^~~~~
foo.cc:75:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator!='
75 | if (index != -1) {
| ~~~~~~^~~~~
[Hydro](https://hydro.ac)提供评测服务