argument type reference vs pointer

Hi again,

I'm a little confused about the following:
I have an event (Qt Signal/Slot concept) that returns a type "const object &", what means it returns a const reference of type object, right or wrong?
When I try to pass this reference to my own function (it has to be a function with exactly the same type), why can't I write something like this:
 
 void function(const object* arg)

Instead, I have to use it like this:
 
void function(const object &arg)

But I do not understand why I can't do it like in the first example...

Can anyone help me with that?
because references != pointers.

You can tecnically write void function(const object* arg) and do function(&foo) later


Ok, sounds logical.. thanks
Topic archived. No new replies allowed.