Problem nprime
User YEethui
Submission Time 2023-10-27 22:37:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nprime.cpp: In function ‘void SieveOfEratosthenes(std::vector<int>&)’:
nprime.cpp:7:2: error: ‘memset’ was not declared in this scope
7 | memset(IsPrime, true, sizeof(IsPrime));
| ^~~~~~
nprime.cpp:3:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’?
2 | #include <vector>
+++ |+#include <cstring>
3 | using namespace std;