From 8f1093f0e00f9b1df7ce343a879303fd56a95d08 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Tue, 29 Oct 2013 17:42:34 +0100 Subject: First commit. --- tests/exec/address2.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/exec/address2.cpp (limited to 'tests/exec/address2.cpp') diff --git a/tests/exec/address2.cpp b/tests/exec/address2.cpp new file mode 100644 index 0000000..75c2c4f --- /dev/null +++ b/tests/exec/address2.cpp @@ -0,0 +1,12 @@ +#include + +void f(int *y) { + *y = 42; +} + +int main() { + int x = 41; + std::cout << "x = " << x << "\n"; + f(&x); + std::cout << "x = " << x << "\n"; +} -- cgit v1.2.3