hex

im trying to do a program that outputs certain things on a txt file. one of those things is a hex coding. i know you can print out an integer in hex format but i need the format to be specific. for an int 100 it prints out 0x64 but i need it to print out 0x00000064 . is there a pre-existing format that i can use or how do i go about doing this?
Do you know hexadecimal?
Last edited on
Look at the iostreams reference information, specifically "showbase" "setw" "hex" and "setfill".
oh didnt know about setfill thanks.
Topic archived. No new replies allowed.