ejemplo de ida y de vuelta:
Código:
#include <sstream>
#include <string>
using namespace std;
// string to int
string some_string;
istringstream buffer(some_string);
int some_int;
buffer >> some_int;
// int to string
int some_int;
ostringstream buffer;
buffer << some_int;
string some_string = buffer.str();