title: How do you concatenate strings and integers in C++?
body: <p>I am trying to concatenate strings and integers as follows:</p>
  
  <pre><code>#include "Truck.h"
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  Truck::Truck (string n, string m, int y)
  {
      name = n;
      model = m;
      year = y;
      miles = 0;
  }
  
  string Truck :: toString()
  {
  
      string truckString =  "Manufacturer's Name: " + name + ", Model Name: " + model + ", Model Year: " + year ", Miles: " + miles;
      return truckString;
  }
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>error: invalid operands to binary expression ('basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;'
        and 'int')
          string truckString =  "Manufacturer's Name: " + name + ", Model Name: " + model + ", Model Year: " + year ", Miles...
  </code></pre>
  
  <p>Any ideas what I might be doing wrong? I am new to C++.</p>