1. Write a function that prompts the user to enter his or her first name and last name, as two separate
values. This function should return both values to the caller via additional pointer (or reference)
parameters that are passed to the function. Try doing this first with pointers and then with references.
(Hint: the function signature will look similar to the swap function from earlier!)
3. Modify the program you wrote for exercise 1 so that instead of always prompting the user for a last
name, it does so only if the caller passes in a
NULL pointer for the last name.
My answer for question 1:
I'm not really sure what the question want me to do, or what is the purpose in it.
using namespace std;
void get_name(string *first_name, string *last_name)
std::cout << "First name: ";
std::cout << "Last name: ";
std::cout << endl;
string first_name, last_name;
std::cout << "Hello " << first_name << " " << last_name << endl;