最后的子串在父串中寻找位置的代码写不对,求解 #include#include #define maxSize 100 //串字符数组最大长度 typedef struct{ char ch[maxSize]; //顺序串的存储数组 int length; //顺序串的实际长度 }SeqString; //初始化字符串void createSeqString(SeqString &s){ s.length=0;} //给字符串赋值void inputSeqString(SeqString &s){ int i=0; char ch1; printf("请输入字符串s(输入#结束):\n"); while ((ch1=getchar())!='#'){ s.ch[i]=ch1; i++; } s.ch[i]='\0'; s.length=i;} //输出长度int LengthSeqString(SeqString &s){ return s.length;} //输出字符串void printSeqString(SeqString &s) { for(int i=0;i s.length||j<1||j>s.length) printf("错误!"); else{ for(n=0;n s.length||j<1||j>s.length) printf("错误!"); for(k;k