8
thể trùng lặp:
int to std::string?chuyển đổi int để std :: string
Làm thế nào bạn có thể chuyển đổi int để std :: string?
thể trùng lặp:
int to std::string?chuyển đổi int để std :: string
Làm thế nào bạn có thể chuyển đổi int để std :: string?
bạn có thể sử dụng chuỗi; đã lấy trộm số này từ here:
#include <iostream>
#include <sstream>
int main() {
int number = 123;
std::stringstream ss;
ss << number;
std::cout << ss.str() << endl;
}
Xem [int to std :: string?] (http://stackoverflow.com/questions/893670/int-to-stdstring) –