You need to use ignore() when you switch from cin >> to getline, since they have different ideas as to what is a delimiter.

Eg.


#include<iostream>
#include<string>
#include<limits>
using...