A simple C++ implementation of the sieve of eratosthenes.
If you would like to run with arguments the option is available, just follow this convention:
./main [limit] [mode (0/1/2)]
Available modes are:
- No output
- Printed output
- File output (primes.txt)
WARNING: Outputting large numbers of primes to a file make have catastrophic consequences, during development I outputted primes under 1 trillion to a file and ended up with an 8GB file and a locked file system before I could stop the program. NOTE: The program gives wrong results with numbers higher than about 4 billion. This is a bug and needs to be fixed.