int num = j;
int numDigits = 0;
while (num>0)
{
numDigits++;
num/=10;
}
std::string zeroes;
if (numDigits == 1)
zeroes = "000";
else
zeroes = "00";
std::string s;
std::stringstream out ;
out << j;
s = out.str();
url = url + zeroes ;
url = url + s;
url = url + ".jpg";
No comments:
Post a Comment