Easy way: Create a spare array as a temporary, move everything after the first space to the temporary array, and then add a comma and a space and append everything before the first space to the end of that array. This is one way of doing it, but I'm not going to show you any code for it (you should do your own homework!).
total = part2 + “, ” + part1;
cout << total << endl;
**so "Smith, John" will show up...I do get that.
What I'm confused with is how I can do it if I want to randomly enter the names into an array. lets say I enter John Smith and Jim Doe. I need to use the " " as a separator between the two names...not sure how to do that since each name may vary in length.