标签:
#include <iostream> int * get() { int b = 3; return &b; } void removeStack() { int k = 5; } int main() { int *x = get(); removeStack(); std::cout<<*x; }
如果不调用removeStack打印出来是3,如果调用打印出来则是5!
标签:
原文地址:http://www.cnblogs.com/withparadox2/p/5802629.html