C++求一個字符串中的全部迴文字符串而且輸出結果(字符串操做)

#include <iostream> #include <string.h> using namespace std; bool check(char *str)//判斷這是否是一個迴文字符串. { int i = 0; int j = strlen(str)-1; while(i<j) { if(*(str+i)!=*(str+j)) return false; i++
相關文章
相關標籤/搜索