J
Jens Thoms Toerring
jacob navia said:Le 24/06/11 15:26, Shao Miller a écrit :
Yes. You must pass an object, not a pointer.
Just out of curiosity: how are things handled if there's no
declaration for the function that expects a reference argument
has been seen by the compiler? Since it's legal not to have a
function prototype (or one that doesn't specify the arguments)
how does the compiler figure out in that case if it has to pass
a pointer or the structure itself when all it sees is
struct xxx bar;
foo(bar_ptr);
Or do you have some constraint that functions expecting refe-
rences can only be used when a full prototype has been seen?
Regards, Jens