There are two forms of getline that concern you in this case. The first is a member function of cin:

char buffer[BUFSIZE];
cin.getline ( buffer, sizeof buffer );

Note that the argument is an array of char, and the maximum number of characters you want to fill it with. The second is a non-member function for the std::string class:

string bufferl
getline ( cin, buffer );

You're mixing those two up by passing a std::string object to the member function, but no such overload for std::string exists. Thus, you need to use the non-member function if you want to continue using the std::string class: