Answer the question
In order to leave comments, you need to log in
The compiler swears?
void__ Scene2::DrawNumeric(int__ num,int__ position)
{
int__ j = -1,jj=-1;
std::string str = "";
for (auto && v : std::to_string(num)) {
//std::cout << v /*- '0'*/ << "|";
str += v;
++j;
switch (str[j])
{
case '0':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[62]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63+position], j);
break;
}
case '1':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[63]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '2':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[64]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '3':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[65]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '4':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[66]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '5':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[67]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '6':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[68]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '7':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[69]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '8':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[70]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
case '9':
{
glBindTexture(GL_TEXTURE_2D, IndexTexture[71]);
EnableTexture(NewTextureCoordinats[0], NewVertexCoordinats[63 + position], j);
break;
}
}
}
}
Answer the question
In order to leave comments, you need to log in
The compiler, which is in the 2010 studio, most likely simply does not know that it is already possible to write like this.for (auto && v : std::to_string(num))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question