I am using the following code to read lines from a text file. What is the best way to handle the case where the string is greater than the limit of SIZE_MAX_LINE?
void TextFileReader::read(string inFilename) { ifstream xInFile(inFilename.c_str()); if(!xInFile){ return; } char acLine[SIZE_MAX_LINE + 1]; while(xInFile){ xInFile.getline(acLine, SIZE_MAX_LINE); if(xInFile){ m_sStream.append(acLine);
c ++
sonofdelphi
source share