When working with Project Euler problems I often need large (> 10**7) bit array\'s.
My normal approach is one of:
bool* sieve = new bool[N]; bool sieve[
If N is known at compile time, use std::bitset, otherwise use boost::dynamic_bitset.