foo.cc: In function 'void solve(char*, char*)':
foo.cc:7:2: error: 'len' was not declared in this scope
len=strlen(s);
^~~
foo.cc:7:2: note: suggested alternative: 'mblen'
len=strlen(s);
^~~
mblen
foo.cc:7:6: error: 'strlen' was not declared in this scope
len=strlen(s);
^~~~~~
foo.cc:7:6: note: suggested alternative: 'mbrlen'
len=strlen(s);
^~~~~~
mbrlen
foo.cc:10:12: error: 'str' was not declared in this scope
if(str[i]==str[i+1])
^~~
foo.cc:16:25: error: conversion from 'int' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested
string tmp=n+'0';
~^~~~
foo.cc:19:21: error: no match for 'operator+=' (operand types are 'char*' and 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}')
ans += tmp;
~~~~^~~~~~
foo.cc: In function 'int main()':
foo.cc:34:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",s); //s为要处理的加密字符串,答案储存在ans里
~~~~~^~~~~~~~
[Hydro](https://hydro.ac)提供评测服务