So i am writing a program that needs to use a single record in the parameter list for the printStudent subprogram instead of the whole collection using a loop inside int main() for some reason it seems to compile and work but when i type a name with a first and last name the output only shows the first name what do i need to change to get the program to output both first and last name?
Change cin >> name; to getline(cin, name);. Also, remove the cin.ignore after it.
Though this shouldn't work at all. The "i" on line 69 has nothing to do with "i" on line 18.
You should change the function to take a Student argument and pass student[i] to it (of course you'll need to change the function a bit).