Skip to content

Instantly share code, notes, and snippets.

@Mjiig
Mjiig / euler.cpp
Created September 9, 2012 21:50
Euler #47
#include <vector>
#include <iostream>
#include <algorithm>
class Primegen
{
std::vector<int> primes; //store all the primes we've generated so far
void nextprime(void); //add one new prime to the end of the list