Monday, June 6, 2016

integer to string and string to integer

integer to string:
int a = 10;
stringstream ss;
ss << a;
string str = ss.str();

string to integer:
stringstream convert(p1);
convert>>v;
stringstream conver(p2);
conver>>v2;
cout<<v+v2<<nl;

No comments:

Post a Comment

Speedup Android Studio

Go to Help ->Edit Custom VM Options, and chnge this 4 setting. After that close your Android Studio. This settings are for 8gb of ram pc...