urgent help please......

Started by
0 comments, last by luckyyyyyy 15 years, 7 months ago
Hi... my problem with glutBitmapLength.... i am working on two opengl projects in visual studio 2008 ... --------------------------- in one project glutBitmapLength is working fine... example: int f_cord_x; f_cord_x = (w - glutBitmapLength(GLUT_BITMAP_HELVETICA_10, "boton"))/2; --------------------- ok when i copy and paste this code to another project then visual studio shows an error.. error C2664: 'glutBitmapLength' : cannot convert parameter 2 from 'char *' to 'const unsigned char *' ------------------------------- its sooooooooo confusing for me...means same glut, same compiler then why it is happening.. i spent a lot of time to correct this problm but i unfortunately couldn't... what's the problem...how can i correct this error... please suggest me... thanks.. [Edited by - luckyyyyyy on September 20, 2008 1:44:38 PM]
Advertisement
I have done it...just placing the (unsigned char*) before the second argument of glutBitmapLength...

f_cord_x = (w - glutBitmapLength(GLUT_BITMAP_HELVETICA_10, (unsigned char*) "boton"))/2;

-----------

its working now...but i don't know whats the problem in one project is working without (unsigned char*)....

This topic is closed to new replies.

Advertisement