title: C++ void function
body: <p>I am new to C++. I have a question regarding <code>void</code> and I can't seem to find a clear answer.</p>
  
  <p>As I have read and understood, <code>void</code> doesn't return any value.</p>
  
  <p>But here, if I say:</p>
  
  <pre><code>void display(int a, int b){
      cout &lt;&lt; a+b;
  }
  </code></pre>
  
  <p>When I use this function in <code>main()</code> as:</p>
  
  <pre><code>display(20,30);
  </code></pre>
  
  <p>Isn't it returning value of <code>a+b</code>?</p>
  
  <p>Can someone please help me understand the logic behind it? </p>