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

📄 c04p223.txt

📁 Data Abstraction & Problem Solving with C++源码
💻 TXT
字号:
list<int> myList;list<int>::iterator curr;// right now, the list is empty;// start the iterator at the beginning of myListcurr = myList.begin();// test for empty listif (curr == myList.end())   cout << "The list is empty" << endl;// insert five items into the list myListfor (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 reachedfor (curr = myList.begin(); curr != myList.end(); curr++)   cout << *curr << " ";cout << endl;

⌨️ 快捷键说明

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