C++同过数组传递后改变数组的元素
#include "Program.h"
#include "ArrayTest.h"
#include "Common.h"
void ChangeDatasByRef(int &m,int &n);
int main()
{
int datas[10]={10,1,2,3,4,5,6,7,8,9};
ChangeArray(datas);
cout<<"After Changed the Array"<<endl;
//int len=GetMyArrayLen(datas);
int len=GetArrayLen(datas);
//int len=10;
for (int i=0;i<len;i++)
{
cout<<datas[i]<<" ";
}
cout<<endl;
int result;
cin>>result;
return 0;
}
ChangeArray