getline has two versions: the member function of cin has a signature like this
Code:
// istream& getline (char* s, streamsize n );
// istream& getline (char* s, streamsize n, char delim );
You use this one with fixed character buffers like this
Code:
char buf[1000];
cin.getline(buf, 1000);
I think the version which operates on std::string came later in the C++ standard, so it's declared differently (as a non-member function)
Code:
// istream& getline (istream& is, string& str, char delim);
// istream& getline (istream& is, string& str);
// ...
string s;
getline(cin, s);
I would prefer the second version, unless you specifically want to limit lines to a certain length
istream::getline - C++ Reference
getline (string) - C++ Reference