title: Copy data from pointers into a void * buffer?
body: <p><strong>tldr:</strong> My Goal is to copy all the data where pointers are refering to, to a void buffer.</p>
  <p>So I have multiple pointer with different types, which are pointing to their data</p>
  <pre><code>const unsigned char * pData8u1 = pContainer1-&gt;GetData();
  const float * pData32f1 = pContainer2-&gt;GetData();
  ...
  const unsigned long long * pData64uN = pContainerN-&gt;GetData();
  </code></pre>
  <p>I store the pointers in a void vector and their dataSize in a size_t vector, so I can iterate through all pointers</p>
  <pre><code>std::vector&lt;const void *&gt; vecData;
  std::vector&lt;const size_t&gt; vecDataSizes;
  </code></pre>
  <p>My Goal is to copy all the data where the pointers are refering to, to a void buffer</p>
  <pre><code>void * destinationBuffer // should contain all data
  </code></pre>
  <p>This buffer has a size. I assume:</p>
  <pre><code>inputDataSize = std::accumulate(vecDataSizes.begin(), vecDataSizes.end(), 0); 
  if(inputDataSize == destinationBufferSize &amp;&amp; inputDataSize != 0) // condition
  {
    // do copy
  }
  </code></pre>
  <p>How do I copy the data referenced by the pointers to this buffer? I am a bit lost. I tried different ideas (memcpy, copy, ...) but could not realize them.
  An easy solution would be great, an efficient solution would be a bonus :)</p>