Different STL containers like vector, stack, set, queue, etc support different access methods on them.
If you are coding for example in Notepad++ or vim, you have to continuously refer to the documentation to see what all methods are available, atleast I have to.
Is there some good way of remembering which container supports which methods??
The names of the methods aren’t different for the sake of being different. It helps in remembering which containers have which methods, to understand the meaning of the name.
push_backfor example is nonsensical in relation to sets.insertdoesn’t make any sense when talking about stacks (of course stacks don’t have a front or a back either, so it doesn’t supportpush_back, justpush). For a vector, both have a well-defined meaning, so vector supports bothinsertandpush_back.