Hi ,I am very confused with pointers.
Why are we passing to the function *&
I red that they are canseling each other void addNodes (vote *&startPtr,vote *¤t,int j)
In a function definition (like what TC has), though, vote*& takes a reference to a pointer, not a normal copy of the object (as you would expect if they 'canceled').
There are more than one use for & in C++. In the code you have shown it means that startPtr is a reference (a reference to a pointer to a vote object).