真正的 C++ 内存模型! (未完工)
void modify(int *pa) {
int *pb = pa + 1;
*pb = 9;
}
int func() {
int a = 4;
int b = 5;
modify(&a);
return b; // 5 还是 9?
}
void modify(int *pa) {
int *pb = pa + 1;
*pb = 9;
}
int func() {
int a = 4;
int b = 5;
modify(&a);
return b; // 5 还是 9?
}
From here you can search these documents. Enter your search terms below.
Keys | Action |
---|---|
? | Open this help |
n | Next page |
p | Previous page |
s | Search |