2.string转char*
string s = "how"; const char *c = s.c_str(); //或s.data();3.in转string#include <sstream>string numToStr(int numn){ stringstream ss; ss << numn; string s2; ss>>s2; return s2;}本文共 246 字,大约阅读时间需要 1 分钟。
2.string转char*
string s = "how"; const char *c = s.c_str(); //或s.data();3.in转string#include <sstream>string numToStr(int numn){ stringstream ss; ss << numn; string s2; ss>>s2; return s2;}转载地址:http://djevx.baihongyu.com/