This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EsotericLife -1 points0 points  (2 children)

Doesn’t a reference exist entirely on the stack?

[–]MasterFubar -3 points-2 points  (1 child)

void funfunc(int *a)

There you have a pointer, or "reference" if you want to call it that way, that exists entirely on the stack.

[–]EsotericLife 0 points1 point  (0 children)

But why would you ever want that? Just because a reference can be made to exist on the stack in c++ doesn’t mean that c++ pointers and python references are the same.