Problem primepie
User PlayVoltz
Submission Time 2023-08-12 15:00:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

primepie.cpp:4:24: error: ‘vector’ has not been declared
4 | bool isPrime(int pnum, vector<int> primes){
| ^~~~~~
primepie.cpp:4:30: error: expected ‘,’ or ‘...’ before ‘<’ token
4 | bool isPrime(int pnum, vector<int> primes){
| ^
primepie.cpp: In function ‘bool isPrime(int, int)’:
primepie.cpp:5:18: error: ‘primes’ was not declared in this scope
5 | for (auto num : primes){
| ^~~~~~
primepie.cpp:11:9: error: ‘i’ was not declared in this scope
11 | while (i*i<=pnum){
| ^
primepie.cpp: In function ‘long long int amountEaten(int)’:
primepie.cpp:22:2: error: ‘vector’ was not declared in this scope
22 | vector <int> primes;
| ^~~~~~
primepie.cpp:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include "primepie.h"