/ Vijos /

记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:12:28: error: expected primary-expression before '[' token
   12 |         tempi = atoi(string[flag+1])*atoi(string[flag-1]);
      |                            ^
foo.cc:12:49: error: expected primary-expression before '[' token
   12 |         tempi = atoi(string[flag+1])*atoi(string[flag-1]);
      |                                                 ^
foo.cc:18:28: error: expected primary-expression before '[' token
   18 |         tempi = atoi(string[flag+1])+atoi(string[flag-1]);
      |                            ^
foo.cc:18:49: error: expected primary-expression before '[' token
   18 |         tempi = atoi(string[flag+1])+atoi(string[flag-1]);
      |                                                 ^
foo.cc:23:5: error: expected ',' or ';' before 'cout'
   23 |     cout<<com[len-4]<<com[len-3]<<com[len-2]<<com[len-1];
      |     ^~~~
foo.cc:22:9: warning: unused variable 'len' [-Wunused-variable]
   22 |     int len = com.length()
      |         ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1849 表达式求值
语言
C++
递交时间
2022-03-21 19:33:41
评测时间
2022-03-21 19:33:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes