Fixed output of unsigned integers.
Changed type of boolean variables to bool. Use unsigned integer type for radix and width parameters.