12-05-2003, 07:27 AM
Hello!
I need to show the run time in the graphic window. I'm trying with things like this:
static char label[50];
double time;
....
sprintf(label,"Tiempo = %8.3f ",time);
glRasterPos2f(10.0,10.0);
for (i = 0; i < 50; i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10,label[i]);
but "sprintf" is not recognized during the compilation.
Does anyone knows if I need to add any other library?
Thank you.
I need to show the run time in the graphic window. I'm trying with things like this:
static char label[50];
double time;
....
sprintf(label,"Tiempo = %8.3f ",time);
glRasterPos2f(10.0,10.0);
for (i = 0; i < 50; i++)
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10,label[i]);
but "sprintf" is not recognized during the compilation.
Does anyone knows if I need to add any other library?
Thank you.