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

📄 list7-2.cpp

📁 使用C++开发过程中
💻 CPP
字号:
// Listing 7.2 demonstrates how a constructor can be used to initialize a container
// with a certain number of objects initialized to a specific value.

#include <list>
#include <iostream>

using namespace std;

void main(void)
{
    list<double>  Sequence(10,1812.23);
    list<double>::const_iterator N = Sequence.begin();
    int Count = Sequence.size();
    while(Count)
    {
      	cout <<  "List Element " << Count << " : " << *N << endl;
      	Count--;
      	N++;
    }
}

⌨️ 快捷键说明

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