The exercise mentions first paragraph only, and a paragraph doesn't include newline character. Thus, we only need 1 getline call.
Also since the exercise is about iterator (even though it doesn't mention it), I still think it's better to implement the solution with iterator for practice purpose
Exercise 3.22
The exercise mentions first paragraph only, and a paragraph doesn't include newline character. Thus, we only need 1
getline
call. Also since the exercise is about iterator (even though it doesn't mention it), I still think it's better to implement the solution with iterator for practice purpose