これは私のコードです。ランタイムチェックの失敗#2-変数「tempSign」の周りのスタックが破損している理由がわかりません。エラーは、char *tempSign[MAX]の2つの値を交換しようとしたときに発生すると思います。誰かが私がこのエラーを受け取っている理由を説明し、この問題を解決するのを手伝ってくれますか?
void constructSet(ZodiacSign *& z,int size)
{
    /*ZodiacSign is a char *
     This is how z was created from the previous function and 
     passed by reference
     ZodiacSign * z;
     z=new char* [num];
    for (int i=0;i<num;i++)
    {
        z[i]=new char [MAXSTR]; 
    } */
    ZodiacSign tempSign [MAX]={"aquarius","pisces","aries","taurus","gemini","cancer","leo",
                               "vergo","libra","scorpio","sagittarius","capricorn"};
    for (int i=0; i<size;i++)
    {
        int x=12;
        int num=(rand()%x);
        char * ptr=tempSign[num];
        strcpy(z[i],ptr);
        swap(num,x,tempSign);
        x--;
    }
}
void swap(int num,int x,ZodiacSign tempSign [MAX])
{
    ZodiacSign temp;
    temp=tempSign[num];
    tempSign[num]=tempSign[x-1];
    tempSign[x]=temp;
}