To insert an element into a C++ list at a specified position, you should use the _______ function. 

  • push 
  • emplace 
  • put 
  • insert
The insert function in C++ STL is used to insert elements at a specific position in a list. emplace is also used for insertion, but it constructs the object in-place, while insert just places a copy or a move of the object.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *