/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);
^