pointer declaration

Discussion in 'C++' started by Michael Sgier, Jun 10, 2009.

  1. 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
    Michael Sgier, Jun 10, 2009
    #1
    1. Advertising

  2. On Jun 10, 3:56 pm, Michael Sgier <> 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
    Anand Hariharan, Jun 10, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noah
    Replies:
    5
    Views:
    944
  2. Alex Vinokur
    Replies:
    4
    Views:
    570
    Jonathan Turkanis
    Apr 5, 2004
  3. Ovidesvideo
    Replies:
    4
    Views:
    476
    Andrey Tarasevich
    Dec 10, 2004
  4. kelvSYC
    Replies:
    6
    Views:
    7,208
    Richard Herring
    May 17, 2005
  5. Bolin
    Replies:
    4
    Views:
    392
Loading...

Share This Page