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

📄 bvectr1.cpp

📁 vc学习的好的代码no.9 vc学习的好的代码no.9
💻 CPP
字号:
#include <iostream>
#include <vector>
#include <bitset>

using namespace std;

const ARRAY_SIZE = 0;

void main(void)
 {
   typedef vector<bool> bit_vector;
   typedef bit_vector::iterator index;

   bit_vector theVector(ARRAY_SIZE);

   // Intialize the array to contain the members [F, T, F, T]

   theVector.push_back(false);
   theVector.push_back(true);
   theVector.push_back(false);
   theVector.push_back(true);

   cout << "First element: " << theVector.front() << endl;
   cout << "Last element: " << theVector.back() << endl;

   cout << "Vector contents" << endl;

   for (index i = theVector.begin(); i < theVector.end(); i++)
     cout << *i << endl;

 }

⌨️ 快捷键说明

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