The first argument to string::getline is an istream object, in this case we are using cin for the object. Any istream object would suffice. Obviously the second argument is the string.