Sieve of Eratosthenes in c++