Jak połączyć ciągi i liczby całkowite w C ++? [duplikować]

To pytanie ma już tutaj odpowiedź:

Jak połączyć łańcuch std :: i int? 29 odpowiedzi

Próbuję połączyć łańcuchy i liczby całkowite w następujący sposób:

#include "Truck.h"
#include <string>
#include <iostream>

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;
}

Dostaję ten błąd:

error: invalid operands to binary expression ('basic_string<char, std::char_traits<char>, std::allocator<char> >'
      and 'int')
        string truckString =  "Manufacturer's Name: " + name + ", Model Name: " + model + ", Model Year: " + year ", Miles...

Jakieś pomysły, co mogę robić źle? Jestem nowym użytkownikiem C ++.

questionAnswers(3)

yourAnswerToTheQuestion