I'm taking an introductory class to C++ for this summer.
The Lab assignment was to make a program that prompts the user to enter their first, middle and last names; and outputs the names in alphabetical order.
But with my current code the output only gives me the middle name. Can I get some pointers please, I've been trying to debug this thing for a good 2 hours but I'm dull at this kind of stuff. Thank you in advance!
#include <iostream>
#include <string>
using namespace std;
int main()
{
string n1, n2, n3;
cout << "Enter your first name, middle name, and last name: ";