I need a variable display routine

This is a discussion on I need a variable display routine within the C++ Programming forums, part of the General Programming Boards category; Okay, I got the font working a-ok. I got two functions, TextLine() and NumberLine(). When you have text, or text ...

  1. #1
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552

    I need a variable display routine

    Okay, I got the font working a-ok. I got two functions, TextLine() and NumberLine(). When you have text, or text mixed with numbers, you use TextLine() if you are using only numbers, you use NumberLine(), because it is faster. Now I need a function that displays variables. Whenever I throw a variable into either one of these functions, it gives a lacks a cast error. So can someone gimmie a function to display variables? Let me explain how my program works. Each picture you have to type BITMAP then whatever you want the name of the pic to be (not the filename) then you type this on another line load_bmp("filename",&picname);

    to display a pic use this
    draw_bitmap(&picname,xposition,yposition)
    for a transparency (black)
    draw_transparent_bitmap(&picname,xposition,ypositi on)

    the bitmap for each letter is the letter.bmp

    PS: Sorry for such a weird bitmap drawing proccess, but you get used to it

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    perhaps...

    have you tried itoa();? it transforms an integer into a string (array).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    but whenever I throw a string OR a variable in a function, it will throw a hissy fit, giving cast errors.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. error display variable value/type
    By George2 in forum C# Programming
    Replies: 1
    Last Post: 07-08-2008, 04:24 PM
  2. variable can auto initialize itself?
    By thinhare in forum C Programming
    Replies: 6
    Last Post: 09-13-2005, 06:07 AM
  3. Using TextOut to display variables
    By jmd15 in forum Windows Programming
    Replies: 4
    Last Post: 06-27-2005, 12:55 PM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. float/double variable storage and precision
    By cjschw in forum C++ Programming
    Replies: 4
    Last Post: 07-28-2003, 06:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21