/ 晓编程 /

记录详情

Compile Error

foo.cc: In function 'int main()':
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 = "上海"){
     ~~~~~~~~~~~~~^~~
foo.cc:11:18: note: candidate: operator||(bool, bool) <built-in>
foo.cc:11:18: note:   no known conversion for argument 2 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'bool'
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 = "上海"){
                        ~~~~~~~~^~~
foo.cc:11:32: note: candidate: operator||(bool, bool) <built-in>
foo.cc:11:32: note:   no known conversion for argument 2 from 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' to 'bool'

自豪的采用jd5进行评测(github.com/masnn/jd5)

信息

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