1、单个的字符或者数字
void swap(int *a,int *b){ int temp=*a; *a=*b; *b=temp;}int main(){ int a=10,b=100; swap(&a,&b); cout<<<"\t"<<
2、字符串的情况(利用指向指针的指针)
void test(char *src,char **dst){ *dst=src;}void swap(int *a,int *b){ int temp=*a; *a=*b; *b=temp;}int main(){ char *s="bhg"; char *dst=new char[10]; test(s,&dst); cout<<
return 0;}