title: How to return a struct from a function
body: <p>I'm learning c++ and my project is about queues. </p>
  
  <p>I have :</p>
  
  <pre><code>struct dough {
      string code;
      int stirringTime;
  };
  </code></pre>
  
  <p>Usually in my tasks, we use <code>int</code> and not <code>struct</code>. That is why I have problems with my delete function:</p>
  
  <p>Using int :</p>
  
  <pre><code>int delQ(Queue &amp;Q) // =&gt; return int
  </code></pre>
  
  <p>If I make: </p>
  
  <pre><code>struct delQ(Queue &amp;Q) // =&gt; what do i return?
  </code></pre>