pointer declaration

M

Michael Sgier

Hi
Error:
.../src/txt.cpp:42: warning: deprecated conversion from string constant
to 'char*'

runtimeerror:
dlerror:/home/michael/X-Plane/Resources/plugins/Cit_X.xpl: undefined
symbol: glutBitmapTimesRoman24


declaration:
void bitmap_output(int x, int y, char *string, void *font);


main:
bitmap_output(40, 35, "This is written in a GLUT bitmap font.",
GLUT_BITMAP_TIMES_ROMAN_24);


How / where should I define GLUT_BITMAP_TIMES_ROMAN_24? Also in the
header? ( I'm coming from VB.NET...) Why do they use a pointer?
Many thanks and regards
Michael
 
A

Anand Hariharan

Hi
Error:
../src/txt.cpp:42: warning: deprecated conversion from string constant
to 'char*'

runtimeerror:
dlerror:/home/michael/X-Plane/Resources/plugins/Cit_X.xpl: undefined
symbol: glutBitmapTimesRoman24

declaration:
void bitmap_output(int x, int y, char *string, void *font);

main:
  bitmap_output(40, 35, "This is written in a GLUT bitmap font.",
    GLUT_BITMAP_TIMES_ROMAN_24);

How / where should I define GLUT_BITMAP_TIMES_ROMAN_24? Also in the
header? ( I'm coming from VB.NET...) Why do they use a pointer?
Many thanks and regards
Michael


Just find it cool though that the particular line of code that has the
problem happens to be line number 42. :)

Wrong newsgroup for "How / where should I define
GLUT_BITMAP_TIMES_ROMAN_24?". Try comp.graphics.api.opengl

As regards to the warning, do

char msg[] ="This is written in a GLUT bitmap font.";
/* ... */
bitmap_output(40, 35, msg, GLUT_BITMAP_TIMES_ROMAN_24);

- Anand
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,961
Messages
2,570,130
Members
46,689
Latest member
liammiller

Latest Threads

Top