C++ examples for Function:Function Creation
Create a function with multiple parameters.
#include <iostream> #include <string> using namespace std; string appendName(string first, string last) { return first + " " + last; } int main()/*from w ww. j a v a 2 s .c om*/ { cout << appendName("Richard", "Nixon") << endl; return 0; }