#include #include using namespace std; int main() { // a is the input. int a = 34532; // y is the temporary C-style char array string. char y[80]; // x is the output string. string x; // The following call formats the int a as // a decimal number and stores it in the // C-style string y. sprintf(y, "%d", a); // Convert y to the C++ style string y. x = y; // Output the converted string. cout << x << endl; return EXIT_SUCCESS; }