title: C++ Concating strings result in "invalid operands of types ‘const char*’ and ‘const char"
body: <p>I want to concat two strings but i get error that i don't understand how to overcome this error.</p>
  
  <p>Is there some way to convert this const char* to char? Should i use some dereferencing?</p>
  
  <pre><code>../src/main.cpp:38: error: invalid operands of types ‘const char*’ and ‘const char [2]’ to binary ‘operator+’
  make: *** [src/main.o] Error 1
  </code></pre>
  
  <p>However, if i try to make up "bottom" string this way, it works:</p>
  
  <pre><code>bottom += "| ";
  bottom += tmp[j];
  bottom += " ";
  </code></pre>
  
  <p>Here is the code. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;vector&gt;
  #include &lt;string&gt;
  #include &lt;iterator&gt;
  #include &lt;sstream&gt;
  
  int main(int argc, char* argv[]) {
  
      ifstream file("file.txt");
  
      vector&lt;string&gt; mapa;
      string line, top, bottom;
  
      while(getline(file,line)){
          mapa.push_back(line);
      }
  
      string tmp;
      for(int i = 0; i &lt; mapa.size(); i++)
      {
          tmp = mapa[i];
          for(int j = 0; j &lt; tmp.size(); j++)
          {
              if(tmp[j] != ' ')
              {
                  top += "+---";
                  bottom += "| " + tmp[j] + " ";
              } else {
  
              }
          }
          cout &lt;&lt; top &lt;&lt; endl;
          cout &lt;&lt; bottom &lt;&lt; endl;
      }
  
      return 0;
  }
  </code></pre>