Original Post
I recently upgraded from BC5.02 to BCB6.0 and am currently importing an old project of mine. Yesterday, when I was going over some file parsing code, I came across something I can''t really understand.
Namely, I''m using ifstream.getline(buf, size, delimiter) to read lines from a binary file up to either a newline or a carriage return. It took me hours to get it working with carriage return as the delimiter as ifstream.tellg() was constantly returning -1. The delimiter is decided upon by parsing the beginning of the file, so there''s no way of knowing in advance which one should be used. When extracting up to a newline, however, ifstream.tellg() is now returning -152 after the call (which seems to be successful and the returned buffer seems to be OK), which is a bit unexpected as 1) this didn''t use to happen before, 2) failbit is not set, 3) I have no clue what -152 means and neither has Google. Ideas?
Cheers