diff options
author | Oskar <[email protected]> | 2024-09-06 10:33:29 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-09-06 10:33:29 +0200 |
commit | 60789ab73d4987068114b0342e71a63f81f65c68 (patch) | |
tree | 2e62dc062e9db9a704c0cf69824259e4599119b0 /6p12.cpp | |
parent | 689b333897de2197e5d6f65c4e7de62cf68334ff (diff) |
more
Diffstat (limited to '6p12.cpp')
-rw-r--r-- | 6p12.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/6p12.cpp b/6p12.cpp new file mode 100644 index 0000000..2453e76 --- /dev/null +++ b/6p12.cpp @@ -0,0 +1,25 @@ +#include <iostream> + +/* + * + * 6.12 + * + * + */ + +void intswapperREF(int &i1, int &i2) { + + int tmp1 = i1; + i1 = i2; + i2 = tmp1; +} + +int main () { + + int i1 = 121212; + int i2 = 323; + std::cout << i1 << " " << i2 << std::endl; + intswapperREF(i1, i2); + std::cout << i1 << " " << i2 << std::endl; + return 0; +} |