在我们的讲座中,我们有以下示例:
int *foo(int x) { return &x; } int* pt = foo(x); *pt = 17;
它被证明是一个不好的例子,但没有进一步解释.为什么这么糟糕?
c pointers
c ×1
pointers ×1