Thread: I need a variable display routine

  1. #1

    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
    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


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

    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
    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