⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example223.cpp

📁 Data Abstraction & Problem Solving with C++源码
💻 CPP
字号:
#include <list>#include <iostream>using namespace std;int main(){	list<int> myList;	list<int>::iterator curr;	// right now, the list is empty;	// start the iterator at the beginning of myList	curr = myList.begin();	// test for empty list	if (curr == myList.end())	   cout << "The list is empty" << endl;	// insert five items into the list myList	for (int j = 0; j < 5; j++)	   // places item j at the front of the list	   curr = myList.insert(curr, j);	// now output each item in the list starting with the	// first item in the list; keep moving the iterator	// to the next item in the list until the end of	// the list is reached	for (curr = myList.begin(); curr != myList.end(); curr++)	   cout << *curr << " ";	cout << endl;	return 0;}  // end main

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -