Thread: outputting an integer

  1. #1
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175

    outputting an integer

    This may sound dumb, and apologies if it has been asked before, but I searched the forum, but none of the threads I found quite gave me an answer. I even searched msdn but it is impossible to find stuff on there(for me, anyway).

    How would I use TextOut() or DrawText() to send out an integer?

    This seems like it would be a common question, but I can't find anything on it.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Convert the integer to a string. Print the string with whichever method.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  3. #3
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175
    Quote Originally Posted by Dave_Sinkula
    Convert the integer to a string. Print the string with whichever method.
    How do I convert the integer to a string? That is what i was asking, i guess.

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    >>This seems like it would be a common question, but I can't find anything on it.<<

    Which is why it's in the faq.

    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385

    In addition, the windows api provides wsprintf and, if you're getting the number from a control, GetDlgItemInt.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Banned SniperSAS's Avatar
    Join Date
    Aug 2005
    Posts
    175
    Sorry, man. I knew I shouldn't have posted a thread on it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory issue
    By t014y in forum C Programming
    Replies: 2
    Last Post: 02-21-2009, 12:37 AM
  2. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  3. Looking for constructive criticism
    By wd_kendrick in forum C Programming
    Replies: 16
    Last Post: 05-28-2008, 09:42 AM
  4. No Match For Operator+ ???????
    By Paul22000 in forum C++ Programming
    Replies: 24
    Last Post: 05-14-2008, 10:53 AM
  5. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM