Very confused about pointers

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 *&current,int j)
yes they are lol...

doing both, is like doing neither ...

so startPtr == *&startPtr

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).
Thanks a lot
Can I read that (*&startPtr)
value of the address startPtr
Topic archived. No new replies allowed.