diff options
Diffstat (limited to 'tests/exec/ref2.cpp')
-rw-r--r-- | tests/exec/ref2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/exec/ref2.cpp b/tests/exec/ref2.cpp new file mode 100644 index 0000000..d4d2eb8 --- /dev/null +++ b/tests/exec/ref2.cpp @@ -0,0 +1,14 @@ +#include <iostream> + +void f(int &y) { + y = 42; +} + +int main() { + int x = 41; + std::cout << "x = " << x << "\n"; + f(x); + std::cout << "x = " << x << "\n"; + x = 41; + std::cout << "x = " << x << "\n"; +} |