Number one:  Please remember to change the title of your post when
starting a new topic.

Number two:  You are never allocating any memory to read your file into!
"out" is just a pointer to some random location in memory.  You have no
idea what is there or what is next to it.  Maybe the next byte over is a
value that controls whether or not to launch ballistic missiles at New
York City!  You read your data to the wherever out is pointing, you
clobber everything around it, and suddenly New York City doesn't exist
any more!

RobR

Reply via email to