C++ 标准库

C++ 标准库
C++ 标准库可以分为两部分:

标准函数库: 这个库是由通用的、独立的、不属于任何类的函数组成的。函数库继承自 C 语言。
面向对象类库: 这个库是类及其相关函数的集合。
C++ 标准库包含了所有的 C 标准库,为了支持类型安全,做了一定的添加和修改。

 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 swap(int *p1,int *p2);
 7     int *pointer_1,*pointer_2,a,b;
 8     cin>>a>>b;
 9     pointer_1=&a;
10     pointer_2=&b;
11     if(a<b)swap(pointer_1,pointer_2);
12     cout<<"max="<<a<<"min="<<b<<endl;
13     return 0;
14 }
15 
16 void swap(int *p1,int *p2)
17 {
18     int temp;
19     temp=*p1;
20     *p1=*p2;
21     *p2=temp;
22 }
原文地址:https://www.cnblogs.com/borter/p/9401361.html