void Gather_Numbers()
{
for (int x = 1; x <= Number_Of_Students; x++)
{
std::cout << "Please enter the information for student " << x << ".\n";
std::cout << "First Name: ";
std::cin >> student[x].first_name;
std::cout << "Last Name: ";
std::cin >> student[x].last_name;
std::cout << '\n';
// std::cin.ignore(1000, '\n'); // not needed
}
}
void Display_Data()
{
for (int x = 1; x <= Number_Of_Students; x++)
{
std::cout << student[x].last_name << ", " << student[x].first_name << '\n';
}
}
And now you get both first and last name to output:
Number of students (must be a positive number less than or equal to 50) = ? 2
Please enter the information for student 1.
First Name: Henry
Last Name: Tubbett
Please enter the information for student 2.
First Name: Joe
Last Name: d'Ragman
Tubbett, Henry
d'Ragman, Joe
Little subject drift, what is described it http://www.cplusplus.com/articles/jEywvCM9/
does not work for me when starting a new topic. All buttons below the edit window, including the length counter, do nothing. I have to submit first and edit to do the mark-up. I use Firefox as browser.