read a line from a text file
Posted on 2002-07-28
I want to read a line from a text file - without having to worry about the possible maximum line legth.
Since ifstream's getline() has the format istream& getline (char* s, streamsize n ); it doesn't really seem to have advanced any from fgtes() - I still need to know & reserve sapce for the possible longest line.
As I am using Borland's C++ Builder, I would like to get the line & stick it straight into an AnsiString, which will worry about space for me.
Any other, non-BC, solutions also welcome (preferably not involving reading char by char)