A Quadratic Sieve implementation in C++