记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:10:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     for (int i = 0; i < expression.length(); i++) {
      |                     ~~^~~~~~~~~~~~~~~~~~~~~
/in/foo.cc:21:18: error: expected ';' before 'int'
   21 |     ss2 >> num2;1
      |                  ^
      |                  ;
   22 |     int result;
      |     ~~~           
/in/foo.cc:21:17: warning: statement has no effect [-Wunused-value]
   21 |     ss2 >> num2;1
      |                 ^
/in/foo.cc:24:9: error: 'result' was not declared in this scope
   24 |         result = num1 + num2;
      |         ^~~~~~
/in/foo.cc:26:9: error: 'result' was not declared in this scope
   26 |         result = num1 - num2;
      |         ^~~~~~
/in/foo.cc:28:13: error: 'result' was not declared in this scope
   28 |     cout << result << endl;
      |             ^~~~~~

信息

递交者
类型
递交
题目
3-5 计算器
比赛
2025年春 南师大《程序设计与竞赛》作业赛第三场
语言
C++
递交时间
2025-03-22 22:29:23
评测时间
2025-03-22 22:29:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes