What is wrong with the following program? How might you correct it
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:9| Question number:6
All Answers
total answers (1)
belongs to book: C++ Primer|Stanley B.Lippman, Josee Lajoie, Barbara E.Moo|5th Edition| Chapter number:9| Question number:6
total answers (1)
The iterator of
`list`does not support iterator arithmetic, including relational operators like`>`,`<`. Thus the condition for the`while loop`should be`iter1 != iter2`.
need an explanation for this answer? contact us directly to get an explanation for this answer