CODE 1 may end in problems, too, because of the missing terminating 0 in read_array
CODE 2 is missing a rewind to begin of file before File.read(memblock,size); and has the same problem with the terminating 0. Replace memblock = new char[size]; by memblock = new char[size + 1]; memblock[size] = 0;
Last edited by jencas; Aug 22nd, 2008 at 11:27 am.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.