title: How to set all the bits in a char array to zeros?
body: <p>I am creating a char pointer to an array and wanted to initilaize it so that all elements in the array have 0 (in bits). So for example:</p>
  
  <pre><code>char* buffer = new char[bufferSize];
  </code></pre>
  
  <p>buffer[0] to buffer[bufferSize] will have '00000000' stored in each index. I am trying to store 8 bits of zeros in each cell.</p>
  
  <p>How can i initialize it? I am also supposed to use fill().</p>
  
  <p>So far, </p>
  
  <pre><code>fill(&amp;buffer, &amp;buffer[bufferSize], 0)
  </code></pre>
  
  <p>doesn't work.</p>