📄 bvectr1.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 + -