What would be better practice when giving a function the original variable to work with:
unsigned long x = 4; void func1(unsigned long& val) { val
My rule of thumb is:
Use pointers if you want to do pointer arithmetic with them (e.g. incrementing the pointer address to step through an array) or if you ever have to pass a NULL-pointer.
Use references otherwise.