Usually conversion of int to string involves some complex loops in c++, however there is actually a simple buffer class that we can use to simplify the conversion for us. Moreover it actually can convert any primitive data type to any primitive data type. by primitive meaning int, char, double, float, string... though string is not to consider primitive..(ntah?). It can be done by few line of code below :
#include
#include
using namespace std;
int main(){
stringstream buffer;
string Astring = "1234";
double Adouble;
int Aint = 32;
buffer<<>Adouble;
cout<>Adouble , we give the buffer a place to store in variable of data type double, since Adouble is a double data type..stringstream can receive any primitive , then rebuffer it to any primitive..