Hi!
I have a text file, I want to check the max length of the lines.
I get an error in the middle of the file.
Does strlen works even for very large strings (size > 30000)
Code:
const int textLineSize = 30000;
char theLine[textLineSize] = "";
ifstream textFile;
textFile.open("text.txt", ios::in);
while (!textFile.eof())
{
textFile.getline(theLine, textLineSize);
length = strlen(theLine);
if (length > maxLength)
maxLength = length;
}
This stops in the middle of file... any size limit for getline or strlen?
Any suggestions?!
Thanks for your time.