Write a recursive functiontest Palindrome that returns true if the string stored in the array is a palindrome, and false otherwise. The function shouldignore spaces and punctuation in the string.
什么意思?发清楚啊啊啊
这判断回文字符串哪里错了?
#includeiostream#includestring.h#define MAXLEN 1000using namespace std;bool checkhws(char* s){int i = 0;for(; i = strlen(s) 2; i ++){if(s[i] != s[strlen(s) – i – 1]){break;}}if(i = strlen(s) 2){return true;}else{return false;}}int main(){char s[MAXLEN];while(cin s){if(checkhws(s)){cout "Yes!" endl;}else{cout "No!" endl;}}return 0;}