I have a problem. If the text is too long in the text file...the program crashes. How to solve it?
jodzjcm 0 Newbie Poster
Recommended Answers
Jump to PostI have a problem. If the text is too long in the text file...the program crashes. How to solve it?
IF the texts inside the text file are within the number of characters to be read in fgets() and is within the length of the array then this …
Jump to PostWhen you read using
fgets()
and the line is longer than the buffer size (or bytes to read) the next read will continue where the last read left off -- in the middle of the line.
All 6 Replies
zeroliken 79 Nearly a Posting Virtuoso
jodzjcm 0 Newbie Poster
zeroliken 79 Nearly a Posting Virtuoso
jodzjcm 0 Newbie Poster
zeroliken 79 Nearly a Posting Virtuoso
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.