getline is the proper way to get a line of input (that may contain spaces).

Since a char is just a small number, you should be able to just do student.grade++;