/ 晓编程 /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:11:18: error: no match for 'operator||' (operand types are 'bool' and 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}')
  if(a == "江苏"||a = "浙江"||a = "上海"){
     ~~~~~~~~~~~~~^~~
/in/foo.cc:11:18: note: candidate: operator||(bool, bool) <built-in>
/in/foo.cc:11:18: note:   no known conversion for argument 2 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'bool'
/in/foo.cc:11:32: error: no match for 'operator||' (operand types are 'const char [7]' and 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}')
  if(a == "江苏"||a = "浙江"||a = "上海"){
                        ~~~~~~~~^~~
/in/foo.cc:11:32: note: candidate: operator||(bool, bool) <built-in>
/in/foo.cc:11:32: note:   no known conversion for argument 2 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'bool'

信息

递交者
类型
递交
题目
P1031 快递小哥
语言
C++
递交时间
2020-02-19 19:32:24
评测时间
2020-02-19 19:32:24
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes