Jan 23, 2012 at 2:02am
I have two variables a and b.
need to make the values holded by them char*. How can i do that?
I need to print the number down. It is a short number. I need to print it to GUI, so need to make it char*
please help. its urgent
Last edited on Jan 23, 2012 at 2:03am
Jan 23, 2012 at 2:28am
void glutPrint(float x, float y, LPVOID font, char* text, float red, float green, float blue)
I need to enter char* text. How can i do that?
Jan 23, 2012 at 10:14pm
str undeclared what can i do?
Jan 24, 2012 at 1:35am
I do have both of them included
Jan 24, 2012 at 2:06am
Ah, yuck. glut isn't const correct. Shame on them. Shame shame shame.
you'll have to const cast it.
|
glutPrint(-1.5, 3,GLUT_BITMAP_TIMES_ROMAN_24, const_cast<char*>(conv.str().c_str()), 1.0, 1.0, 1.0);
|
Last edited on Jan 24, 2012 at 2:07am
Jan 24, 2012 at 2:18am
I made the function so shame on me.
not really a shame bacause I am a beginner. lol
anyway.. thanks sooo much.
Jan 24, 2012 at 2:38am
oh. In that case, don't do const_cast, but change the function to take a const char*
instead of a char*
.