"Push" adds an element to an array-like structure (one with a linear arrangement of elements, 0, 1, 2, 3, etc.). "Pop" removes it. Wikipedia is a decent source of information for general programming concepts:
Double-ended queue - Wikipedia, the free encyclopedia
With regard to a deque you can push and pop from both ends of the array. The best way to learn is to do. Here's something to start you off:
Code:
#include <deque>
#include <iostream>
using namespace std;
int main(void) {
deque<int> deck;
for (int i = 0; i < 10; i++) {
deck.push_front(i);
deck.push_back(i);
}
while (!deck.empty()) {
cout << deck.front() << " ";
deck.pop_front();
}
cout << endl;
return 0;
}
Here's some documentation for deque:
deque - C++ Reference
Now use that and the code I gave you and go play around until you understand what you need to know. That site, and this one, also have tutorials:
C++ Language Tutorial - C++ Documentation
C++ Tutorial - Introduction to C++ - Cprogramming.com
Have fun