出现0x77047094 处有未经处理的异常: 0xC0000005: Access violation 求指导
#include<iostream>using namespace std;
int main()
{void move(int *,int, int);
int number[20],n,m,i;
cout<<"how many numbers ?";
cin>>n;
cout<<"input "<<n<<"numbers:"<<endl;
for(i=0;i<n;i++)
cin>>number[i];
cout<<"how many places do you want move ?";
cin>>m;
move(number,n,m);
cout<<"Now,they are:"<<endl;
for(i=0;i<n;i++)
cout<<number[i]<<" ";
cout<<endl;
return 0;
}
void move(int *arry,int n,int m)
{
int *p,array_end;
for (p=arry+n-1;p>arry;p++)
*p=*(p-1);
*arry=array_end;
m--;
if(m>0) move(arry,n,m);
}
编译成功,但是调试的时候出现0x77047094 处有未经处理的异常: 0xC0000005: Access violation
是什么原因?