I have a function (legacy) that reads the first few lines of a file to determine its type, then closes and reopens the file so it can re-read the entire file using the correct interpreter.The gist is:
I used to be a C++ expert a decade ago, but for the past 10 years I\'ve been programming Java. I just started a C++ project that uses a small third-party XML parser. The XML parser accepts an STL istr
I am trying to make my file parsing more robust.Using an ifstream, how can I ensure seekg keeps me in a valid position within the file?
Requirement : I must read until EOF (16 bytes a time) from a particular file , and then say sleep for 5 seconds. Now,