This is a very commom error for beginners.
The reason is that you're mixing input methods.

Code:
    cin>>size;
The stream extractors stop reading when they find a whitespace -> leaving the final '\n' in the buffer

Code:
    string name;
    cout<<"Insert the name of the person you wanna terminate"<<endl;
    getline(cin,name);
getline stops reading when it finds the terminating character ( by default '\n' ) that's why an empty string is returned.
solution: put
Code:
    cin.ignore();
after the use of the stream extractor.
Kurt