记录详情

Compile Error

/in/foo.cc: In function 'int integer(int, int)':
/in/foo.cc:11:25: error: invalid operands of types 'int' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' to binary 'operator%'
   integers[i-1]=(num-num%pow(10,i-1))/pow(10,i-1);//求每一位上的数
                      ~~~^~~~~~~~~~~~
/in/foo.cc:12:22: error: no match for 'operator*' (operand types are 'std::vector<int>' and '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}')
   num=num-integers[i]*pow(10,i-1);
           ~~~~~~~~~~~^~~~~~~~~~~~
/in/foo.cc:14:25: error: cannot convert 'std::vector<int>' to 'int' in return
  return integers[digit-1];
                         ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:19:2: error: 'a' was not declared in this scope
  a=integer(num,3);
  ^
/in/foo.cc:20:2: error: 'b' was not declared in this scope
  b=integer(num,2);
  ^
/in/foo.cc:21:2: error: 'c' was not declared in this scope
  c=integer(num,1);
  ^

信息

递交者
类型
递交
题目
反序数字
语言
C++
递交时间
2024-04-28 20:15:29
评测时间
2024-04-28 20:15:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes