Ahh yes, converting a number to a string.
If you want to convert a number to an std::string (and you really should use std strings where possible, by the way), C++11 has a std::to_string function. If your particular implementation doesn't support std::to_string, or you don't like to use C++11, and you're not too concerned about speed, the following function works, and when std::to_string is implemented in the standard library, you can just delete the function definition and carry on as normal and everything should just work.
#include <string>
#include <sstream>
namespace std
{
template <typename T>
string to_string(const T & value)
{
stringstream stream;
stream << value;
return stream.str();
}
}