Initialize deque with 26 copies of the letter x
#include <iostream>
#include <cassert>
#include <list>
#include <deque>
#include <algorithm> // For merge
using namespace std;
int main()
{
// Initialize deque1 with 26 copies of the letter x:
deque<char> deque1(26, 'x');
deque<char>::iterator i;
cout.precision(10);
for (i = deque1.begin(); i != deque1.end(); ++i)
cout << *i << endl;
return 0;
}
/*
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
*/
Related examples in the same category