Professional Documents
Culture Documents
RV Lknu 7 D
RV Lknu 7 D
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();
}