title: How to set a maximum size for my container Deque with C ++?
body: <p>I need help defining a maximum size of my STD container of type Deque.</p>
  <p><a href="https://en.cppreference.com/w/cpp/container/deque" rel="nofollow noreferrer">Deque Documentation C++</a></p>
  <p>In this case, I would have to store a maximum number of clients in a given child in a data structure as in the example below:</p>
  <pre><code>typedef struct Cart {
       int id;
       string clientName;
       int numberOfProducts;
       double purchaseValue;
  } Cart;
  </code></pre>
  <p>I defined a constant:</p>
  <pre><code>#define MAX_CLIENT 10
  </code></pre>
  <p>And I'm about to define the queues, which must have a maximum of 10 clients:</p>
  <pre><code>deque&lt;Cart&gt; BOX_1(MAX_CLIENT);
  deque&lt;Cart&gt; BOX_2(MAX_CLIENT);
  deque&lt;Cart&gt; BOX_3(MAX_CLIENT);
  </code></pre>
  <p>But it seems that the structure is still dynamic, even defining the maximum number.</p>
  <p>Thanks for the contribution.</p>