What is the use of cin.getline?

what is the use of line no. 15 which is cin.getline in the code?

cin.getline() is similar to cin, just it allows to take input with white spaces as well