Click here to Skip to main content
16,011,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Why does my SetDIBColorTable fail ? Pin
ninck24-May-05 20:32
ninck24-May-05 20:32 
Generalfprint problem Pin
Andrew Admire24-May-05 8:21
Andrew Admire24-May-05 8:21 
GeneralRe: fprint problem Pin
David Crow24-May-05 8:34
David Crow24-May-05 8:34 
GeneralRe: fprint problem Pin
Andrew Admire24-May-05 8:39
Andrew Admire24-May-05 8:39 
GeneralRe: fprint problem Pin
David Crow24-May-05 9:19
David Crow24-May-05 9:19 
GeneralRe: fprint problem Pin
Ivan Cachicatari24-May-05 8:40
Ivan Cachicatari24-May-05 8:40 
GeneralRe: fprint problem Pin
Andrew Admire24-May-05 8:50
Andrew Admire24-May-05 8:50 
GeneralRe: fprint problem Pin
Toby Opferman24-May-05 9:09
Toby Opferman24-May-05 9:09 
You can do that by simply doing

fprintf(fFile, "%02d\n", dwIndex);


The "2" means set a width of 2 places for the number and the "0" means fill in the places not used with 0.

So the following should print 00, 01, 02, ...

for(dwIndex = 0; dwIndex < 100; dwIndex++)
{
   fprintf(fFile, "%02d\n", dwIndex);
}



8bc7c0ec02c0e404c0cc0680f7018827ebee
GeneralRe: fprint problem Pin
Ivan Cachicatari24-May-05 9:13
Ivan Cachicatari24-May-05 9:13 
GeneralRe: fprint problem Pin
Andrew Admire24-May-05 10:03
Andrew Admire24-May-05 10:03 
GeneralRe: fprint problem Pin
Toby Opferman24-May-05 10:06
Toby Opferman24-May-05 10:06 
GeneralRe: fprint problem Pin
Andrew Admire24-May-05 10:16
Andrew Admire24-May-05 10:16 
GeneralRe: fprint problem Pin
Toby Opferman24-May-05 11:17
Toby Opferman24-May-05 11:17 
GeneralRe: fprint problem Pin
Ivan Cachicatari24-May-05 10:27
Ivan Cachicatari24-May-05 10:27 
GeneralRe: fprint problem Pin
toxcct24-May-05 21:50
toxcct24-May-05 21:50 
GeneralRe: fprint problem Pin
26-May-05 3:41
suss26-May-05 3:41 
GeneralRe: fprint problem Pin
toxcct26-May-05 4:22
toxcct26-May-05 4:22 
GeneralRe: fprint problem Pin
Andrew Admire26-May-05 4:29
Andrew Admire26-May-05 4:29 
GeneralSkinned apps in Windows Pin
vanne24-May-05 8:07
vanne24-May-05 8:07 
GeneralRe: Skinned apps in Windows Pin
Tom Archer24-May-05 8:48
Tom Archer24-May-05 8:48 
GeneralRe: Skinned apps in Windows Pin
marstxj17-Aug-05 3:17
marstxj17-Aug-05 3:17 
Generalpc interface with usb Pin
vikas makhija24-May-05 7:47
vikas makhija24-May-05 7:47 
GeneralRe: pc interface with usb Pin
Jaime Olivares25-May-05 11:14
Jaime Olivares25-May-05 11:14 
GeneralSocket Programming Pin
Identity Undisclosed24-May-05 7:39
Identity Undisclosed24-May-05 7:39 
GeneralRe: Socket Programming Pin
Michael Hendrickx24-May-05 8:05
Michael Hendrickx24-May-05 8:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.