hi..
im trying to get a line using getline() function from an input file, but it is ignoring end line character. is there any other function that would including the end line character? btw, im not allowed to use something like aString+'\n'
thanks in advance~
wildplace
0
Junior Poster in Training
Recommended Answers
Jump to Postfgets()
Jump to Post
fgets()
reads up to n-1 characters or \n, whichever comes first.
Write out what was read.
Read again to get the next batch of characters.
If the firstfgets()
reads 1/2 a line, the nextfgets()
reads the rest.
All 7 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
wildplace
0
Junior Poster in Training
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
wildplace
0
Junior Poster in Training
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
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.