가능한 중복 :
Easiest way to convert int to string in C++간단한 C++ - 문자열과 연결 및 변환 INT에 대한 문자열
나는 비주얼 C++ 문자열에 대한 질문이 있습니다. 다음 문자열을 연결하고 싶습니다.
#include<sstream>
for (int i=0; i<23; i++)
{
stringstream left, right;
left << "C:/x/left" << i << ".bmp";
right << "C:/x/left" << i << ".bmp";
imagelist.push_back(left.str());
imagelist.push_back(right.str());
}
stringstream
for (int i=0; i<23; i++)
{
imagelist.push_back("C:/x/left"+i+".bmp");
imagelist.push_back("C:/x/right"+i+".bmp");
}
들으