now that's one easy question..

This is a discussion on now that's one easy question.. within the C++ Programming forums, part of the General Programming Boards category; Umm.. where to start?.. Ok.. I was writing a program using the SDL library.. and tried to print out the ...

  1. #1
    Registered User LogicError's Avatar
    Join Date
    Aug 2003
    Location
    г. Магнитогорск
    Posts
    76

    Question now that's one easy question..

    Umm.. where to start?.. Ok.. I was writing a program using the SDL library.. and tried to print out the score (int score) to the screen using drawString(...).. it kept giving me errors cannot convert, etc.. the same thing is when you try to output numbers using windows' MessageBox().. then I read a tutorial and found this: drawString(...,...,"Score: %d",score); .. and it worked.. what exactly does the %d do there and what other stuff like that there is that I don't know (I bet it's C stuff..)?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    Yes it's C, and it takes its inspiration from the printf() family of functions.

    Whether it implements all the conversions of printf() is another matter.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User LogicError's Avatar
    Join Date
    Aug 2003
    Location
    г. Магнитогорск
    Posts
    76
    umm.. yeah.. but whre can i find more information about it?

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,497
    How about your compiler manual pages?

    Or google "printf manual page"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. easy Vector contructor question
    By noodle24 in forum C++ Programming
    Replies: 5
    Last Post: 04-21-2006, 07:43 PM
  2. Another Embarassingly Easy Question
    By almo89 in forum C Programming
    Replies: 2
    Last Post: 02-11-2006, 03:59 PM
  3. This is hopefully an extremely easy question...
    By rachaelvictoria in forum C Programming
    Replies: 2
    Last Post: 11-07-2005, 12:36 AM
  4. 4 easy question
    By Zeratulsdomain in forum C++ Programming
    Replies: 2
    Last Post: 10-15-2005, 10:43 PM
  5. Easy Question
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 08-12-2002, 12:19 PM

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