carnival.cpp:16:12: error: 'll link [300]' redeclared as different kind of entity
16 | ll link[300], col[300];
| ^
In file included from /usr/include/c++/13/bits/atomic_wait.h:45,
from /usr/include/c++/13/bits/atomic_base.h:42,
from /usr/include/c++/13/bits/shared_ptr_atomic.h:33,
from /usr/include/c++/13/memory:81,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56,
from carnival.cpp:1:
/usr/include/unistd.h:819:12: note: previous declaration 'int link(const char*, const char*)'
819 | extern int link (const char *__from, const char *__to)
| ^~~~
carnival.cpp: In function 'int main()':
carnival.cpp:46:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
46 | link[i] = l;
| ^
carnival.cpp:46:29: error: assignment of read-only location '*(link + ((sizetype)i))'
46 | link[i] = l;
| ~~~~~~~~^~~
carnival.cpp:62:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
62 | x = link[x];
| ^
carnival.cpp:62:23: error: invalid conversion from 'int (*)(const char*, const char*) noexcept' to 'll' {aka 'long long int'} [-fpermissive]
62 | x = link[x];
| ~~~~~~^
| |
| int (*)(const char*, const char*) noexcept