SFML community forums
Help => General => Topic started by: Bizarreofnature on October 25, 2017, 05:12:29 pm
-
Hello there!
I hope this is the right section for my question. However:
What exactly is the difference between a list and list::iterator?
And when do I use those?
EDIT: And what is the difference between "remove" and "erase" ?
Thanks in advance,
Bizarreofnature
-
That is a C++ question. This is the SFML forum. For C++-only questions it is advised to seek another forum to post at.
Neverthless, regarding your questions, you ought to read something about STL containers. Meanwhile read here: http://www.cplusplus.com/reference/iterator/ and http://www.cplusplus.com/reference/list/list/
-
Thank you for your answer.
I see. I am sorry about posting it in the wrong forum, I just did because it directly affects my Game that I code.
So a list contains objects and an iterator is used to work them off piece by piece.
May I be allowed to ask a last question, even if it is the wrong forum.
Remove just removes objects from the list but erase destroys them?
-
It is ok, i just read it. Thanks!