C++ writing int to binary file

Byron Clark byron at theclarkfamily.name
Mon Apr 27 21:23:13 MDT 2009


On Mon, Apr 27, 2009 at 08:52:20PM -0600, Jessie Morris wrote:
> file.write(reinterpret_cast<char *>(items),sizeof(int));

Assuming that items is an int, you'll probably want &items instead of
items.

-- 
Byron Clark



More information about the PLUG mailing list