C++ 字符转字符串 | C++ 小程序
#include <iostream>#include <vector>
#include <string>
int main()
{
std::vector<std::string> list;
for (int i{}; i < 10; i++) {
std::string tempS(1, ('0' + i));
list.push_back(tempS);
}
for (auto i : list) {
std::cout << i << " ";
}
return 0;
}
页:
[1]