imageFile为left文件夹下名为1到10的图片
for (int i = 1; i < 10; i++)
{string ii;
int2str(i, ii);
string str = ii + ".jpg";
string imagepath = "D:\\FACE\\testsvm\\left\\";
string imagepath1 =imagepath+str;
char imagepath2[30];
strcpy(imagepath2, imagepath1.c_str());
const char* imageFile = imagepath2;
cout <<"imageFile " << imageFile << endl;
}
void int2str(const int &int_temp, string &string_temp)
{
stringstream stream;
stream << int_temp;
string_temp = stream.str(); //此处也可以用 stream>>string_temp
}