C++: Insertion des éléments avec la combinaison ‘insert’ et ‘end’

Author:

 list, assert, list, deque
{filelink=15006}


#include 
#include 
#include 
#include 
#include

#include 
#include 
using namespace std;

int main()
{
  deque deq;

  deq.insert(deq.end(), "A");
  deq.insert(deq.end(), "D");
  deq.insert(deq.end(), "Z");

  deque::iterator pos;

  for (pos=deq.begin(); pos!=deq.end(); ++pos) {
        cout << *pos << ' ';
  }

  return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *