正在加载图片...
第六章指针、引用与动态内存分配 cout< <endl pf=&list[o] sort(pfn);∥(n个数排序 i=0 while(i<ni cout<<sew(8)<<isti];/输出排序的n个数 ++ f(9%8==0) cout< <endl cout< <endl void swap1( float* a float*b){∥)交换两个变量的值 fie loat temp; temp=*a; a=*b; *b=temp第六章 指针、引用与动态内存分配 cout<<endl; pf=&list[0]; ssort(pf,n); //对n个数排序 i=0; while(i<n){ cout<<setw(8)<<list[i];//输出排序的n个数 i++; if(i%8==0) cout<<endl; } cout<<endl; } void swap1(float *a,float *b) { //交换两个变量的值 float temp; temp=*a;*a=*b;*b=temp;}
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有