标准函数库

标准函数库
标准函数库分为以下几类:

输入/输出 I/O
字符串和字符处理
数学
时间、日期和本地化
动态分配
其他
宽字符函数

 1 #include <iostream>
 2 
 3 /* run this program using the console pauser or add your own getch, system("pause") or input loop */
 4 using namespace std;
 5 int main(int argc, char** argv) {
 6     void exchange(int *,int *,int *);
 7     int a,b,c,*p1,*p2,*p3;
 8     cin >>a>>b>>c;
 9     p1=&a;
10     p2=&b;
11     p3=&c;
12     exchange(p1,p2,p3);
13     cout <<a<<" "<<b<<" "<<c<<endl;
14     return 0;
15 }
16 void exchange(int *q1,int *q2,int *q3)
17 {
18     void swap(int *,int *);
19     if(*q1<*q2)swap(q1,q2);
20     if(*q1<*q3)swap(q1,q3);
21     if(*q2<*q3)swap(q2,q3);
22 }
23 
24 void swap(int *pt1,int *pt2)
25 {
26     int temp;
27     temp=*pt1;
28     *pt1=*pt2;
29     *pt2=temp;
30 }
原文地址:https://www.cnblogs.com/borter/p/9401375.html