I'm working on an assignment and I'm trying to have the user enter a name, like this:
This seems ok to me, but I get this error:Code:cout << "please enter this student's full name:\n>";
cin.getline(search.name,strlength);
185 is the getline line, and strlength is a global const int. I'm using gcc on a redhat linux 9, does anybody know what might be causing this?Quote:
lab4.cpp:185: invalid conversion from `int (*)(char*)' to `int'
lab4.cpp:185: initializing argument 2 of `std::basic_istream<_CharT,
_Traits>& std::basic_istream<_CharT, _Traits>::getline(_CharT*, int) [with
_CharT = char, _Traits = std::char_traits<char>]'