Write a function to convert First Name, Last Name to Last Name, First Name.
Utilisateur anonyme
#include using namespace std; void swap (string * first, string * last); int main () { string first, last; cout > first; cout > last; swap (&first, &last); cout << "Swapping your first and last name." << endl; cout << "Your first name is now " << first << "." << endl; cout << "Your last name is now " << last << "." << endl; return 0; } void swap (string * pfirst, string * plast) { string temp = *pfirst; *pfirst = *plast; *plast = temp; }