📜  std::list insert - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:00.192000             🧑  作者: Mango

代码示例1
//3.1 Create list and iterator
list theList;
Add_ListElements(theList);
Print_List(theList);
//3.2 Position the Iterator for Insertion
list::iterator Position;
Position = theList.begin();
Position++;
Position++;
//3.3 Insert an element and print the list
printf("\nAfter inserting the Single Element,");
Position = theList.insert(Position, 7);
Print_List(theList);