C++基础笔记(int转string) int a = 23; stringstream ss; ss << a; string s1 = ss.str(); 头文件需添加#include "sstream"