Main.cc: In function ‘int main()’: Main.cc:6:15: error: no matching function for call to ‘getline(std::istream&, char [105])’ getline(cin,a); ^ In file included from /usr/include/stdio.h:859:0, from /usr/include/c++/7/cstdio:42, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:46, from Main.cc:1: /usr/include/x86_64-linux-gnu/bits/stdio.h:115:1: note: candidate: __ssize_t getline(char**, size_t*, FILE*) getline (char **__lineptr, size_t *__n, FILE *__stream) ^~~~~~~ /usr/include/x86_64-linux-gnu/bits/stdio.h:115:1: note: candidate expects 3 arguments, 2 provided In file included from /usr/include/c++/7/string:52:0, from /usr/include/c++/7/bits/locale_classes.h:40, from /usr/include/c++/7/bits/ios_base.h:41, from /usr/include/c++/7/ios:42, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from Main.cc:1: /usr/include/c++/7/bits/basic_string.h:6339:5: note: candidate: template std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) getline(basic_istream<_CharT, _Traits>&& __is, ^~~~~~~ /usr/include/c++/7/bits/basic_string.h:6339:5: note: template argument deduction/substitution failed: Main.cc:6:15: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘char [105]’ getline(cin,a); ^ In file included from /usr/include/c++/7/string:52:0, from /usr/include/c++/7/bits/locale_classes.h:40, from /usr/include/c++/7/bits/ios_base.h:41, from /usr/include/c++/7/ios:42, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from Main.cc:1: /usr/include/c++/7/bits/basic_string.h:6332:5: note: candidate: template std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT) getline(basic_istream<_CharT, _Traits>&& __is, ^~~~~~~ /usr/include/c++/7/bits/basic_string.h:6332:5: note: template argument deduction/substitution failed: Main.cc:6:15: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘char [105]’ getline(cin,a); ^ In file included from /usr/include/c++/7/string:52:0, from /usr/include/c++/7/bits/locale_classes.h:40, from /usr/include/c++/7/bits/ios_base.h:41, from /usr/include/c++/7/ios:42, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from Main.cc:1: /usr/include/c++/7/bits/basic_string.h:6324:5: note: candidate: template std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) getline(basic_istream<_CharT, _Traits>& __is, ^~~~~~~ /usr/include/c++/7/bits/basic_string.h:6324:5: note: template argument deduction/substitution failed: Main.cc:6:15: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘char [105]’ getline(cin,a); ^ In file included from /usr/include/c++/7/string:53:0, from /usr/include/c++/7/bits/locale_classes.h:40, from /usr/include/c++/7/bits/ios_base.h:41, from /usr/include/c++/7/ios:42, from /usr/include/c++/7/istream:38, from /usr/include/c++/7/sstream:38, from /usr/include/c++/7/complex:45, from /usr/include/c++/7/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52, from Main.cc:1: /usr/include/c++/7/bits/basic_string.tcc:1537:5: note: candidate: template std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT) getline(basic_istream<_CharT, _Traits>& __in, ^~~~~~~ /usr/include/c++/7/bits/basic_string.tcc:1537:5: note: template argument deduction/substitution failed: Main.cc:6:15: note: mismatched types ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘char [105]’ getline(cin,a); ^