记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:9:13: warning: comparison with string literal results in unspecified behavior [-Waddress]
    9 |         if(c=="+")
      |            ~^~~~~
foo.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cc:13:18: warning: comparison with string literal results in unspecified behavior [-Waddress]
   13 |         else if(c=="-")
      |                 ~^~~~~
foo.cc:13:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cc:18:17: error: break statement not within loop or switch
   18 |                 break;
      |                 ^~~~~

信息

递交者
类型
递交
题目
3-5 计算器
语言
C++
递交时间
2025-08-07 19:31:28
评测时间
2025-08-07 19:31:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes