You are on page 1of 1

#include <stdio.

h>
#include <array>
#include <vector>

void test1() {
int a;
printf("test1.&a: %p\n", &a);
}

void test2() {
int _[4096];
_[0] = 0;
test1();
}

void test3() {
std::array<int, 4096> _;
_[0] = 0;
test1();
}

void test4() {
std::vector<int> _(4096);
_[0] = 0;
test1();
}

int main() {
int a;
printf("main.&a: %p\n", &a);
test1();
test2();
test3();
test4();
}

You might also like