blob: 1d2efeee429e4fef431a517ab8394a94780c64b5 (
plain) (
tree)
|
|
#include <iostream>
int test(int a) {
int *b = &a;
*b = *b + 42;
return a;
}
int main() {
int x = 0;
int y = test(x);
std::cout << "x = " << x << "\n";
std::cout << "y = " << y << "\n";
}
|