in c++
class bar
{
int i;
char b;
float d;
};
void foo ( bar arg );
void foo ( bar &arg );
void foo ( bar *arg );
this i
In any reasonable way passing by reference will probably result in code involving addresses of objects. However, the main issue is that using references is more idiomatic C++ and should be the preferred style; you should really not be seeing raw pointers a lot at all in your own code.
Also note that passing by value and by reference is fundamentally different in the sense that passing by reference allows the callee to modify the argument. If anything, you should be comparing f(bar) with f(const bar &).