Problem adjlist
User claireau
Submission Time 2023-11-16 09:32:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjlist.cpp: In function ‘int main()’:
adjlist.cpp:11:12: error: invalid conversion from ‘int’ to ‘void*’ [-fpermissive]
11 | memset(g, -1, sizeof(g));
| ^
| |
| int
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/c++config.h:528,
from /usr/include/c++/9/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:33,
from adjlist.cpp:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:1: note: initializing argument 1 of ‘void* memset(void*, int, size_t)’
59 | __NTH (memset (void *__dest, int __ch, size_t __len))
| ^~~~~
adjlist.cpp:14:8: error: invalid types ‘int[int]’ for array subscript
14 | g[A][B] = W;
| ^
adjlist.cpp:15:8: error: in