/in/foo.cc: In function 'int toInt(char)':
/in/foo.cc:56:17: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
for(i=strlen(str)-1;i>=0;i--){
^
In file included from /in/foo.cc:2:0:
/usr/include/string.h:394:15: note: initializing argument 1 of 'size_t strlen(const char*)'
extern size_t strlen (const char *__s)
^~~~~~
/in/foo.cc:57:16: error: invalid types 'char[int]' for array subscript
ans+=base(str[i]-'0');
^
/in/foo.cc:57:21: error: 'base' cannot be used as a function
ans+=base(str[i]-'0');
^