title: Passing an array pointer for placing in a hashmap in C++
body: <p>I'm kinda new to C++ (coming from C#).</p>
  
  <p>I'd like to pass an array of data to a function (as a pointer).</p>
  
  <pre><code>void someFunc(byte *data)
  {
      // add this data to a hashmap.
  
      Hashtable.put(key, data)
  }
  </code></pre>
  
  <p>This data will be added into a hashmap (some key-value based object).</p>
  
  <p>In C#, i could just add the passed reference to a dictionary and be done with it.</p>
  
  <p>Can the same be done in C++ ? or must i create a COPY of the data, and only add that to the data structure for storing it ?</p>
  
  <p>I have seen this pattern in some code examples, but i am not 100% sure why it is needed, or whether it can be avoided at certain times.</p>