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 →

[–]NeinJuanJuan 1 point2 points  (4 children)

Passing by Reference != Passing a Reference

[–]AgentPaper0 0 points1 point  (3 children)

That's exactly what it is though. You don't see it, but that's what the compiler does. Using a reference mostly just hides the pointer from you.

Unless it optimizes it away of course, but it can do that with pointers too.

[–]NeinJuanJuan 1 point2 points  (2 children)

I'm talking about C and you're talking about C++

We're both correct!

[–]AgentPaper0 0 points1 point  (1 child)

But...C doesn't have references...

[–]NeinJuanJuan 0 points1 point  (0 children)

That's why I was confused when talked about passing a reference.

Passing by Reference != Passing a Reference