Added headers for stdio and cstring
Fixed error with std::transform

Original used tostring without namespace qualifier. Changed to
::tostring to fix compiler error in g++.