>but I have no idea what it does or how to implement it.
It's actually quite simple, the constructor converts an int to a string and assigns that string to base. The overloaded = operator does the same thing, the overloaded += operator converts base to an int with atoi and adds it's argument to that value, then uses sprintf to convert back to a string and assign to base. The overloaded + operator uses the overloaded += operator to do all of the dirty work.

The only part that might be confusing is

char base[std::numeric_limits<int>::digits + 1];

which sets the size of base as the number of bits - 1 in a signed int + 1 for the nul character. Overkill, yes, but oh well.

-Prelude