Submission #00054
ソースコード
ステータス
項目 |
データ |
問題 |
0005 - 聖書 |
ユーザー名 |
ei1903
|
投稿日時 |
2021-03-15 14:21:28 |
言語 |
C++17 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
228 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:13:19: error: no matching function for call to ‘getline(std::__cxx11::string&, std::istream&)’
getline(t, cin);
^
In file included from /usr/include/stdio.h:929,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/cstdio:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:46,
from ./Main.cpp:1:
/usr/include/bits/stdio.h:116:1: note: candidate: ‘__ssize_t getline(char**, size_t*, FILE*)’
getline (char **__lineptr, size_t *__n, FILE *__stream)
^~~~~~~
/usr/include/bits/stdio.h:116:1: note: candidate expects 3 arguments, 2 provided
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:53,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.tcc:1537:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’
getline(basic_istream<_CharT, _Traits>& __in,
^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.tcc:1537:5: note: template argument deduction/substitution failed:
./Main.cpp:13:19: note: ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::basic_istream<_CharT, _Traits>’
getline(t, cin);
^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6354:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
getline(basic_istream<_CharT, _Traits>& __is,
^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6354:5: note: template argument deduction/substitution failed:
./Main.cpp:13:19: note: ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::basic_istream<_CharT, _Traits>’
getline(t, cin);
^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6362:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)’
getline(basic_istream<_CharT, _Traits>&& __is,
^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6362:5: note: template argument deduction/substitution failed:
./Main.cpp:13:19: note: ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::basic_istream<_CharT, _Traits>’
getline(t, cin);
^
In file included from /usr/local/gcc-8.2.0/include/c++/8.2.0/string:52,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/locale_classes.h:40,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/bits/ios_base.h:41,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ios:42,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/istream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/sstream:38,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/complex:45,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/ccomplex:39,
from /usr/local/gcc-8.2.0/include/c++/8.2.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6369:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(std::basic_istream<_CharT, _Traits>&&, std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’
getline(basic_istream<_CharT, _Traits>&& __is,
^~~~~~~
/usr/local/gcc-8.2.0/include/c++/8.2.0/bits/basic_string.h:6369:5: note: template argument deduction/substitution failed:
./Main.cpp:13:19: note: ‘std::__cxx11::string’ {aka ‘std::__cxx11::basic_string<char>’} is not derived from ‘std::basic_istream<_CharT, _Traits>’
getline(t, cin);
^
セット
テストケース