getline() issue

Joined
Sep 29, 2008
Messages
1
Reaction score
0
I have a text file that in some places have newlines in the middle.

For example:

My name is Sam.

I am a novice programmer.
I go to school

in Michigan.

I use getline() to read through the entire file, and then I send it to a function to tokenize it into sentences that end in periods. My problem is that if the sentence doesn't end in a period, but rather a newline (like I go to school), it still stops rather than going on to read "I go to school in Michigan."

I know that the third parameter of a getline() function can be '\n' but for some reason that isn't working.

Any suggestions would be helpful!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top