摘要: 1、一级指针实现值交换void swap(int *v1,int *v2){ int temp = 0; temp = *v1; *v1 = *v2; *v2 = temp;}int _tmain(int argc, _TCHAR* argv[]){ int a = 2; int b = 3; swap(&a,&b); std::cout<<a<<std::endl; std::cout<<b<<std::endl; system("pause"); return 0;}2、二级指针实现值交换void swap 阅读全文
posted @ 2014-02-18 22:45 晓康勘探 阅读(434) 评论(0) 推荐(0) 编辑