TheButcher
Programmer
Can someone pleez help me out here.
For the int:
I tried using fputs(), but this gave me a warning and then a core dump. Then I tried it using fputc() but it gave me '^F' character????????. These are the only 2 functions in my book for file writing. Can I cast it? If so, how.
For the hexadecimal:
I have the number as an int and want to write it to the file as a hex. I can print it onto the screen as a hex by using the %x in the printf() function. Is there a way to fully convert it into a hex number so I can write it to a file. I can't find a function that does this in my C book.
Thanks in advance!
For the int:
I tried using fputs(), but this gave me a warning and then a core dump. Then I tried it using fputc() but it gave me '^F' character????????. These are the only 2 functions in my book for file writing. Can I cast it? If so, how.
For the hexadecimal:
I have the number as an int and want to write it to the file as a hex. I can print it onto the screen as a hex by using the %x in the printf() function. Is there a way to fully convert it into a hex number so I can write it to a file. I can't find a function that does this in my C book.
Thanks in advance!