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[
You might be interested in trying the BITSCAN library as an alternative. Recently an extension has been proposed for sparseness, which I am not sure is your case, but might be.