I am using fstream to read the stream from a binary file. I use the method ().
fstream f1 ("log dat", ios :: in | ios :: binary); Four zMsgSize [MSG_SIZE]; ZMsgSize [0] = '\ 0'; F1.get (zMsg, CHR_END); CHR_END is a special terminative character I've already put in the file. The file I am reading is empty characters, that is why I am trying to read it as a stream. My problem is that when the method does not read until the terminal character when it encounters a weak character, the reading ends even here That's when I use an additional surcharge of the get () method, in which I can specify the number of characters to read, the result is the same. What is it that I am doing wrong and how can I read this file completely without using a blank stream without a problem?
Thank you!
Comments
Post a Comment