close
個人覺得比 itoa 還來的簡單、方便


範例:
#include
#include
#include
using namespace std;

int main () {

stringstream oss;
string mystr;

oss << "Sample string";
mystr=oss.str();

cout << mystr;

return 0;
}

參考網站
arrow
arrow
    全站熱搜

    JohnDX 發表在 痞客邦 留言(0) 人氣()