固定路径+变量,再组成新的char类型路径 const char *fileName="BMP\\"; char* name=new char[20]; sprintf(name,"%s%d",fileName,ix);