Compile Error

foo.cc: In function ‘int times(std::string, std::string)’:
foo.cc:7:16: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ (did you forget the ‘()’ ?)
    7 |         if(fis.size==1||turn.size==1)
      |            ~~~~^~~~
      |                    ()
foo.cc:7:30: error: invalid use of member function ‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]’ (did you forget the ‘()’ ?)
    7 |         if(fis.size==1||turn.size==1)
      |                         ~~~~~^~~~
      |                                  ()

信息

递交者
类型
自测
题目
P2558 单位转换3级T2 2023.12
语言
C++
递交时间
2025-07-23 09:04:25
评测时间
2025-07-23 09:04:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes