1 points · by medymed · 6y ago · 1 comment
First, can switch language to c++ Can paste this example using stack & heap:
class Foo{public:Foo(int _b){bar=_b;}; int bar=4;};
int main() {
int i=1;
Foo *f1=new Foo(4);
return 0;
}
Other languages are enjoyable to explore too (compare with python frame/object visualization).
http://pythontutor.com/cpp.html#mode=display
I tried your code, and was stunned. Now to paste ... something larger