int and string

int转string一、#include <sstream>

int n = 0;

std::stringstream ss;

std::string str;

ss<<n;

ss>>str;

二、#include <string>

to_string(num);

string转int

std::string str = "123";

int n = atoi(str.c_str());

上一篇:LINQ to SQL语句(3)之Count/Sum/Min/Max/Avg


下一篇:Highcharts-3.0.6