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년 전 1
함수 B에서 lst.erase를 왜 it에 대입해주지 않으면 실행이 안되는지 궁금합니다!!