Changed long long to boost::long_long_type and unsigned long long to boost::ulong_long_type. A couple of other typo corrections, to get the code compiling with g++ -pedantic.