Differences between pointer and by reference [duplicate]
Possible Duplicate:
开发者_Python百科Difference between pointer variable and reference variable in C++
I am trying to figure out what the big difference is between using pointers and references. Is it like reference for stack objects and then pointers for heap? But then can't you have pointer on the stack?
Here's a great resource What are the differences between a pointer variable and a reference variable in C++?
The difference is really only in the syntax used.
精彩评论