有了getNext函数 主函数该如何写才能输出字符串的next值


void getNext(SqString *t,int next[]){

    int i=0,j=-1;
    next[0]=-1;
    while(i<t->length)
    {
        if((j==-1)||(t->data[i]==t->data[j]))
        {
            i++;
            j++;
            next[i]=j;
        }
        else
            j=next[j];
    }

}