line 50 and 51: array numbers always begin with 0, not 1.
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++)
{
num[i][j] = j+1;
}
}
line 44: >>matrixPermute (temp);
This is a recursive function call, yet you always are passing the same value of temp which never changes in that loop. It looks like that function will be an infinite recursion, which will eventually crash and burn the program.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,953 posts
since Aug 2005