You could either use sprintf or stringstream.
sprintf
char str[32]; // Buffer size of 31 characters plus '\0' (string termination)
sprintf(str, "FPS : %d", dbScreenFPS());
//sprintf_s(str, 32, "FPS : %d", dbScreenFPS()); // Safer version - prevents buffer overruns
//sprintf_s<32>(str, "FPS : %d", dbScreenFPS()); // Another form of a safer version
dbText(10, 10, str);
stringstream
#include <sstream>
std::stringstream str;
str << "FPS : " << dbScreenFPS();
dbText(10, 10, (char*)str.str().c_str()); // .c_str() call and (char*) cast required because
// dbText asks for a non-const pointer to char*, when it has no reason to, so we just give it a const one and say that it's not const
“C++ : Where friends have access to your private members.”
-Gavin Russell Baker