writing to a text file

Hi guys,

How would write this into a text file using fprintf.

p = 0x0174C0
q = 0x01D9E8
r = 0

#split p,q,artunc\Axelr.bin

So I get the result below, written in the text file

#split 0x0174C0,0x01D9E8,artunc\Axel00.bin

Also p, q and r are incremented each time they are looped

e.g

#split 0x0174C0,0x01D9E8,artunc\Axel00.bin
#split 0x0274C0,0x02D9E8,artunc\Axel01.bin
#split 0x0374C0,0x03D9E8,artunc\Axel02.bin
fprintf(f, "0x%x", p);
or
yourstream << "0x" << reinterpret_cast<void*>(p);
Thanks for the help kbw much appreciated
Last edited on
Topic archived. No new replies allowed.