How can I write a for loop that will help me run this twice so that I won't have to re-type code for other data type Student variables?
Student S1, S2;
for (int x = 1; x < 3; x++)
{
cout << "Enter First Name: " << endl;
getline(cin,Firstname);
S1.setFname(Firstname); // I was thinking something like S[x] ????
cout << "Enter Last Name: " << endl;
getline(cin,Lastname);
S1.setLname(Lastname); // I was thinking something like S[x] ????
}