数组作为形参时会自动退化成指针。个人觉得很形象
#include<iostream>
void ExchangeString(char* a,char*b)//(char a[],char b[])
{
char tt[128];
char pp[128];
strcpy(tt,a);
strcpy(pp,b);
strcpy(a,pp);
strcpy(b,tt);
}
void main()
{
char a[128]="qwertyui";
char b[128]="ghjk";
ExchangeString(a,b);
std::cout<<a<<"\n"<<b<<std::endl;
system("pause");
}