Re: [Dev-C++] A bit stumped on binary files
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ewald H. <in...@ho...> - 2004-05-22 21:03:44
|
>In fopen you can specify a binary stream with the b modifier in the >wanted open type (glibc reference). I do open the file as binary, using an IO stream. That's not the problem. I need to know how to convert an integer value into it's 4 byte equivalent. For instance 39184 is $00009910 and I would like to write [00,00,99,10] as hex values to my file. I was just wondering if there was a way to dump an entire struct to a file and then read it back later. Regards Ewald Horn Proprietor/Eienaar : Horn Labs Cell/Sel : 083 519 1615 Website : http://www.hornlabs.co.za Email/E-pos : in...@ho... |