|
-
Sep 21st, 2001, 04:20 PM
#1
Formatting Numbers in Strings
I'm using sprintf to print numeric & string data into a buffer.
The code i've used is sprintf(szBuf,"Size : %d bytes",&fsize)
So far so good.
How can i set up the number to be formatted to show seperators ie
What i want to display : Size : 1,128,654 bytes
What i'm able to do with sprintf : Size : 1128654 bytes
-
Sep 23rd, 2001, 10:37 AM
#2
Monday Morning Lunatic
I recall seeing something on MSDN that would take a file size in bytes, and then print it out, as in File->Properties.
I couldn't find it again though - will keep looking
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 23rd, 2001, 10:46 AM
#3
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 23rd, 2001, 03:09 PM
#4
Thanks you very much, just what i needed.
-
Sep 23rd, 2001, 04:42 PM
#5
Monday Morning Lunatic
No problem.
BTW - this is the function that Explorer uses
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|