F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39099186_14035.cpp: In function 'int main()':
0_0_39099186_14035.cpp:34:23: error: no matching function for call to 'getline(std::string&, std::istream&)'
   34 |         while (getline(s, cin)) {
      |                ~~~~~~~^~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:55,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39099186_14035.cpp:1:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.tcc:895:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
  895 |     getline(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.tcc:895:5: note:   template argument deduction/substitution failed:
0_0_39099186_14035.cpp:34:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
   34 |         while (getline(s, cin)) {
      |                ~~~~~~~^~~~~~~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:54:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4071:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4071 |     getline(basic_istream<_CharT, _Traits>& __is,
      |     ^~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4071:5: note:   template argument deduction/substitution failed:
0_0_39099186_14035.cpp:34:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
   34 |         while (getline(s, cin)) {
      |                ~~~~~~~^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4079:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 4079 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4079:5: note:   template argument deduction/substitution failed:
0_0_39099186_14035.cpp:34:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
   34 |         while (getline(s, cin)) {
      |                ~~~~~~~^~~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4086:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4086 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:4086:5: note:   template argument deduction/substitution failed:
0_0_39099186_14035.cpp:34:23: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
   34 |         while (getline(s, cin)) {
      |                ~~~~~~~^~~~~~~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 16:56:00, Gzip enabled