C++ Function Definition Create a function with multiple parameters.

Description

C++ Function Definition Create a function with multiple parameters.

#include <iostream>

using namespace std;

string appendName(string first, string last)
{
  return first + " " + last;
}

int main()/*  w ww .j  av a2 s . c  om*/
{
  cout << appendName("Richard", "Nixon") << endl;
  return 0;
}



PreviousNext

Related