摘要:
using namespace std; #include <iostream> #include<string> //自定义字符串存储结构String(包括char数组、length长度) #define maxlen 20 typedef struct { char ch[maxlen]; in 阅读全文
摘要:
using namespace std; #include <iostream> #include<string> //第1种,用string自带的s.subdtr()截取任意子串,再用s.compare()确定是否与待求子串相等,时间复杂度O(len1*len2) int index1(strin 阅读全文