title: in C++, what's the difference between an object and a pointer to an object?
body: <p>In java and objective-c, a variable representing an object is generally a pointer to that object. However, it seems that in C++, it's common to have non-pointer types hold objects. What's the difference between the two? </p>
  
  <p>If I pass a struct as an argument to a function, I believe I'm passing by value, meaning I'm actually creating a new struct in memory, and changes to that struct inside the function its passed to won't affect the "source" struct outside the function. However, if I pass a pointer to a struct, there's still only one original struct, and changes to the struct referenced by the pointer will be visible to any code which is aware of this struct. Do I have that right?</p>
  
  <p>So, is there any difference with objects? When I pass a non-pointer object to a function, does the entire object get copied?</p>