have you got any more code as if there is a problem you might need to show us the whole program. there is a good fstream tutorial on the site that can solve problems...

Im not entirely sure but my RLE compression / De-compression snippet MIGHT have file -> array code, but I think I performed the routine "on-the-fly"....