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_39050932_16840.cpp: In function 'int main()':
0_0_39050932_16840.cpp:29:18: error: no matching function for call to 'getline(std::istream&, char [15])'
   29 |     while(getline(cin,s)){
      |           ~~~~~~~^~~~~~~
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++/bitset:52,
                 from .\stdc++.h:52:
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_39050932_16840.cpp:29:18: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [15]'
   29 |     while(getline(cin,s)){
      |           ~~~~~~~^~~~~~~
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_39050932_16840.cpp:29:18: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [15]'
   29 |     while(getline(cin,s)){
      |           ~~~~~~~^~~~~~~
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_39050932_16840.cpp:29:18: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [15]'
   29 |     while(getline(cin,s)){
      |           ~~~~~~~^~~~~~~
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_39050932_16840.cpp:29:18: note:   mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'char [15]'
   29 |     while(getline(cin,s)){
      |           ~~~~~~~^~~~~~~
0_0_39050932_16840.cpp:30:14: error: request for member 'size' in 's', which is of non-class type 'char [15]'
   30 |         if(s.size()==0){
      |              ^~~~


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 20:15:05, Gzip enabled