title: 2D string Array C++: Integer Concatenation Into String
body: <p>I want to start off by saying that I have almost no experience with C++ but I am taking a college class for it this semester and was just sort of messing around so that I am a little better prepared for the class. I know a good amount of Java but almost no C++.</p>
  
  <p>Basically, I want to make some integers part of a string that will go into a string 2D Array. Then I want to print out just to make sure that everything is in the array...I realize that the second for loop isn't really necessary but I put it there anyway.</p>
  
  <p>My problem is that I keep getting an error message when trying to do:</p>
  
  <pre><code>myArray[i][j] = "(" &lt;&lt; i &lt;&lt; "," &lt;&lt; j &lt;&lt; ")";
  </code></pre>
  
  <p>Specifically, it tells me:</p>
  
  <pre><code>error: invalid operands of types 'const char*' and 'const char [2]' to binary 
         'operator+'
  </code></pre>
  
  <p>I don't understand this error nor do I know how to fix it...</p>
  
  <p>Here is what I have.</p>
  
  <pre><code>int height = 5;
  int width = 5;
  string myArray[height][width];
  
  for (int i = 0; i &lt; height; ++i) {
      for (int j = 0; j &lt; width; ++j) {
          myArray[i][j] = "(" &lt;&lt; i &lt;&lt; "," &lt;&lt; j &lt;&lt; ")";
      }
  }
  
  for (int i = 0; i &lt; height; ++i) {
      for (int j = 0; j &lt; width; ++j) {
          cout &lt;&lt; myArray[i][j] &lt;&lt; "  ";
      }
  }
  </code></pre>
  
  <p>I just want to know how to fix the error and then I would also like to know specifically why I am getting said error. Thanks!</p>