foo.cc: In function 'int toInt(char)':
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 foo.cc:2:0:
/usr/include/string.h:384:15: note: initializing argument 1 of 'size_t strlen(const char*)'
extern size_t strlen (const char *__s)
^~~~~~
foo.cc:57:16: error: invalid types 'char[int]' for array subscript
ans+=base(str[i]-'0');
^
foo.cc:57:21: error: 'base' cannot be used as a function
ans+=base(str[i]-'0');
^
foo.cc: In function 'int main()':
foo.cc:15:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&max,&lines);
~~~~~^~~~~~~~~~~~~~~~~~~~~
foo.cc:17:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",problem);
~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务