codice:#include <iostream> #include <sstream> #include <string> using namespace std; inline std::string to_string(const T& x); int main() { int a, b; cout << "Inserisci valore A: "; cin >> a; cout << "Inserisci valore B: "; cin >> b; // sommo a + b a += b; // concateno str e charS (possibile solo utilizzando la classe string del C++) str = "Risultato: "; str+= to_string(a); cout << str << endl; system("pause"); return 0; } /* Universale! Va con ogni tipo o classe :) */ template <typename T> inline std::string to_string(const T& x) { std::ostringstream os; os << x; return os.str(); }