Problem greeting
User dl2704
Submission Time 2023-11-17 10:31:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

greeting.cpp: In function ‘int main()’:
greeting.cpp:5:15: error: no matching function for call to ‘std::basic_istream<char>::getline(std::string&)’
5 | cin.getline(s);
| ^
In file included from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from greeting.cpp:1:
/usr/include/c++/9/istream:647:5: note: candidate: ‘std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::getline(std::basic_istream<_CharT, _Traits>::char_type*, std::streamsize, std::basic_istream<_CharT, _Traits>::char_type) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::char_type = char; std::streamsize = long int]’
647 | basic_istream<char>::
| ^~~~~~~~~~~~~~