// C++ code to demonstrate "to_string()" method
// to convert number to string.
#include<iostream> #include<string> // for string and to_string()
string stri = to_string(i_val);
// Conversionoffloatinto string using
// to_string()
string strf = to_string(f_val);
#include<iostream> #include<string> usingnamespacestd;
intmain(){
int i=11;
string str= to_string(i);
cout<<"string value of integer i is :"<<str<<"\n";
return0;
}