cyberland.cpp: In function 'double solve(int, int, int, int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
cyberland.cpp:25:11: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type' {aka 'std::vector<double>'} to 'void*'
25 | memset(dis[0], 0, sizeof(dis[0]));
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type {aka std::vector<double>}
In file included from /usr/include/features.h:502,
from /usr/include/x86_64-linux-gnu/c++/13/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/13/bits/c++config.h:679,
from /usr/include/c++/13/bits/requires_hosted.h:31,
from /usr/include/c++/13/vector:60,
from cyberland.h:1,
from cyberland.cpp:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:57:1: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
57 | __NTH (memset (void *__dest, int __ch, size_t __len))
| ^~~~~
cyberland.cpp:27:64: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type' {aka 'std::vector<double>'} to 'void*'
27 | for(int i = 0; i < N; ++i) if(vis[i] && arr[i] == 0) memset(dis[i], 0, sizeof(dis[i])), pq.emplace(0.0, i, 0);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<std::vector<double> >, std::vector<double> >::value_type {aka std::vector<double>}
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:57:1: note: initializing argument 1 of 'void* memset(void*, int, size_t)'
57 | __NTH (memset (void *__dest, int __ch, size_t __len))
| ^~~~~