foo.cc: In function 'int toInt(char)':
foo.cc:56:14: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
56 | for(i=strlen(str)-1;i>=0;i--){
| ^~~
| |
| char
In file included from foo.cc:2:
/nix/store/iczlqwdj10xiz3mmms6adnra0mn3ljk1-glibc-2.35-224-dev/include/string.h:407:35: note: initializing argument 1 of 'size_t strlen(const char*)'
407 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
foo.cc:57:14: error: invalid types 'char[int]' for array subscript
57 | ans+=base(str[i]-'0');
| ^
foo.cc:57:21: error: 'base' cannot be used as a function
57 | ans+=base(str[i]-'0');
| ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务