运行 ID: 75665

Main.cc: In function ‘int main()’:
Main.cc:7:27: error: no matching function for call to ‘std::__cxx11::basic_string::length(std::__cxx11::string&)’
     int len=str.length(str);
                           ^
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:926:7: note: candidate: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]
       length() const _GLIBCXX_NOEXCEPT
       ^~~~~~
/usr/include/c++/7/bits/basic_string.h:926:7: note:   candidate expects 0 arguments, 1 provided