Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > pointer declaration

Reply
Thread Tools

pointer declaration

 
 
Michael Sgier
Guest
Posts: n/a
 
      06-10-2009
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
 
Reply With Quote
 
 
 
 
Anand Hariharan
Guest
Posts: n/a
 
      06-10-2009
On Jun 10, 3:56*pm, Michael Sgier <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
maxplusII error: a deferred constant declaration without a full declaration is not supported Noah VHDL 5 04-07-2006 02:34 PM
Variable declaration taken as a function pointer declaration Bolin C++ 4 12-02-2005 05:28 PM
"virtual outside class declaration" and "declaration does not declare anything" kelvSYC C++ 6 05-17-2005 08:58 AM
Function declaration in class declaration Ovidesvideo C++ 4 12-10-2004 06:36 PM
Intel C++ 8.0 : declaration hides declaration Alex Vinokur C++ 4 04-05-2004 09:49 PM



Advertisments