![]() |
|
#1
|
|||
|
|||
Question about sprintf()Hi.
I have a little question, I use the sprintf() like this: CPP / C++ / C Code:
so the 'temp' (for instance) is 05d0, my question is, supposed I would like it to be %05%d0, how to I set the % char in the sprintf() ?? it supposed to be something like: CPP / C++ / C Code:
no ? Thanks. Last edited by LuciWiz : 23-Feb-2005 at 06:20.
Reason: Please insert your C code between [c] & [/c] tags
|
|||
|
#2
|
|||
|
|||
|
To print the '%' character in any of the printf() functions you can use the '%%' format specifier to tell it to just print a percentage sign, so your code would probably look something like this:
CPP / C++ / C Code:
|
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| non-member function question | crq | C++ Forum | 1 | 03-Feb-2005 21:59 |
| Simple question on arrays--please help! | brookeville | C++ Forum | 16 | 17-Nov-2004 23:23 |
| Repetition structure problem and question | brookeville | C++ Forum | 17 | 29-Oct-2004 17:48 |
| sprintf and snprintf question in C | rn2388 | C Programming Language | 1 | 16-Jun-2004 15:11 |
| question of practice | magiccreative | C++ Forum | 1 | 06-Feb-2004 07:17 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The