kmj020827   2년 전

함수 B에서 lst.erase를 왜 it에 대입해주지 않으면 실행이 안되는지 궁금합니다!!

zenith82114   2년 전

https://en.cppreference.com/w/cpp/container/list/erase

iterator erase( iterator pos ); --- (1)

Erases the specified elements from the container.

1) Removes the element at pos.

References and iterators to the erased elements are invalidated. Other references and iterators are not affected.

Return value

Iterator following the last removed element.

1) If pos refers to the last element, then the end() iterator is returned.

kmj020827   2년 전

감사합니다!

댓글을 작성하려면 로그인해야 합니다.