title: How to concatenate two string *arr[] in C++
body: <p>Im a bit stumped here. Im working on building a binary heap class, modeled by an array. I'm trying to take two arrays of strings, and concatenate them together (for a merge function) to create a new array, which I'll then perform sorting operations on.</p>
  
  <p>Both of the arrays are initialized like so in my interface:</p>
  
  <pre><code>string *heapArray;
  </code></pre>
  
  <p>Both arrays are constructed as so in my implementation:</p>
  
  <pre><code>heapArray = new string[10];
  </code></pre>
  
  <p>And the code that I tried, which won't compile, is this:</p>
  
  <pre><code>merged-&gt;heapArray = one-&gt;heapArray + two-&gt;heapArray;
  </code></pre>
  
  <p>So obviously I've done something wrong here, but I haven't done any concatenation of raw C++ arrays in the past, mostly play it safe with vectors. Alas, working on this optimization assignment requires it. Any guidance would be appreciated.</p>
  
  <p>I realize I haven't posted much code, but I get frustrated by people who post mass blocks of code on here. I've posted what I think is relevant, but if there is something specific I'm missing which would be helpful, let me know and I'll add it.</p>