Mooophy / Cpp-Primer

C++ Primer 5 answers
Creative Commons Zero v1.0 Universal
8.11k stars 3k forks source link

[ex3_22] Process first paragraph only, and change range for to iterator #836

Open iamvickynguyen opened 1 year ago

iamvickynguyen commented 1 year ago

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