How do I read long lines from a text file in C++?
<p>I am using the following code for reading lines from a text-file. What is the best method for handling the case where the line is greater than the limit SIZE_MAX_LINE?</p>

<pre><code>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); //Appending read line to string
        }
    }

    xInFile.close();
}
</code></pre>
