Problem lampposts
User shoryu386
Submission Time 2022-12-28 09:29:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lampposts.cpp: In function ‘void find_lampposts(int, int, int*)’:
lampposts.cpp:32:40: error: ISO C++ forbids applying ‘sizeof’ to an expression of function type [-fpermissive]
32 | memset(braindead, -1, sizeof(braindead));
| ^
lampposts.cpp:32:9: error: invalid conversion from ‘int (*)(int)’ to ‘void*’ [-fpermissive]
32 | memset(braindead, -1, sizeof(braindead));
| ^~~~~~~~~
| |
| int (*)(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 lampposts.cpp:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:1: note: initializing ar