引用调用的用法
来源:互联网 发布:二维数组排序 php 编辑:程序博客网 时间:2024/05/21 17:29
#include <iostream>
using namespace std;
swap(int & a,int & b)
{
int tmp;
tmp=a;
a=b;
b=tmp;
}
void main()
{
int x,y;
cout << "input two number " << endl;
cin >> x;
cin >> y;
if(x<y)
swap(x,y);
cout << "x=" << x <<endl;
cout << "y=" << y <<endl;
}
using namespace std;
swap(int & a,int & b)
{
int tmp;
tmp=a;
a=b;
b=tmp;
}
void main()
{
int x,y;
cout << "input two number " << endl;
cin >> x;
cin >> y;
if(x<y)
swap(x,y);
cout << "x=" << x <<endl;
cout << "y=" << y <<endl;
}
0 0
- 引用调用的用法
- this用法-当前对象的引用与调用构造函数
- java的引用调用
- 引用的用法
- 引用的用法
- 引用的用法
- PHP引用的用法
- 引用的用法
- 引用的用法
- 注意引用的用法
- 引用的用法
- C++引用的用法
- 引用的简单用法
- 13.引用的用法
- C++的引用的用法
- 025 函数的引用调用
- C++的值调用和引用调用
- 引用“ & " 的用法 与 指针的用法
- JVM 运行时数据区
- poj2965_The Pilots Brothers' refrigerator(bfs)
- 数据结构和算法(Java版本)
- leetcode-204-Count Primes
- graphm.h
- 引用调用的用法
- 工厂方法模式
- 总结1
- leetcode 生成杨辉三角形, 118 119 Pascal's Triangle 1,2
- hdu 3722Card Game(KM匹配求环)
- 枚举变量的使用
- sublime text 3搭建Python编程环境步骤
- JVM java对象引用强度
- JAVA随机数之多种方法从给定范围内随机N个不重复数