How to use %d in C++, particularly in DrawText() [duplicate]
问题 This question already has an answer here : How can I use DrawText() to display a variable? (1 answer) Closed 6 years ago . so ive heard of %d, but i dont know how to use it. here is what i want to do: DrawText (hdcWindow, "PLACE IN QUESTION" , -1, &rc, DT_SINGLELINE); at the "PLACE IN QUESTION" i want to display text and a variable like "text %d" or something, but I don't know the syntax, and how do I dictate what %d will represent when it is displayed? 回答1: DrawText doesn't work like printf