This is a discussion on reading bitmap into array within the C Programming forums, part of the General Programming Boards category; Originally Posted by Sebastiani puts("Iceberg at 12 o'clock - full speed ahead!"); No you are supposed to do that first, ...
puts("I don't know how to swim!");
please throw a life preserver, I don't care if we need to unwind the stack!
Last edited by ಠ_ಠ; 07-26-2009 at 04:19 PM.
You need to compile with -SNAFU -allfloats
>> Thanks for all the suggestions but despite my constant resizing being inefficient, it's part of the directions, so I will follow that.
In that case, go back to your original code.
Code:set 'nsize' to 1 and allocate a byte. loop (omit the loop control field in the for loop entirely) fread one byte if fread fails, exit the loop increment bitmap::size if bitmap::size is equal to 'nsize', double 'nsize' and realloc (as you had in the original code)
Haha, you guys seem to be having fun.
Thanks a lot for all the help! I've successfully been able to read from the header all the necessary information and so I'm just working on a nifty encryption now. Thanks again!
>> You need to compile with -SNAFU -allfloats
That won't work with GCC, though. How about -mhard-float -mno-fast-fix -mno-single-exit?
Yeah, that sounds about right.