Iterate over primes using primesieve::iterator.
#include <iostream>
int main()
{
uint64_t sum = 0;
for (; prime < 10000000000ull; prime = it.
next_prime())
sum += prime;
std::cout << "Sum of the primes below 10^10 = " << sum << std::endl;
return 0;
}