#include <string>
#include <iostream>
using namespace std;
int a = 3;
cout << to_string(a) << endl;
// 使用to_string()函数即可
cpp中int转string
最新推荐文章于 2024-03-10 15:35:46 发布
#include <string>
#include <iostream>
using namespace std;
int a = 3;
cout << to_string(a) << endl;
// 使用to_string()函数即可