What does & in front of a function argument mean?

Hi

I have this function:
EventGetUserId(Event, &userID);

userID is an (unsigned int) variable, but what does the & in front of it mean/do?
It returns the memory address of userID
see http://www.cplusplus.com/doc/tutorial/pointers/
It means, pass the address of userID rather than pass its value. We call this pass by reference. It allows EventGetUserId to change the value of userID.
Thanks
Topic archived. No new replies allowed.