pounce is a user on cmpwn.com. You can follow them or interact with them if you have an account anywhere in the fediverse.
pounce @pounce

Can someone help me understand the difference between &knuckles and *knuckles? I'm new to c++

@pounce `&` is for getting a pointer, as `*` is for dereferencing your pointer (accessing the pointed value)

@Bl4ckb0ne
(I know about the operators, this was mostly about the meme, still, I'm confused about the difference between
`void foo(int &bar)`
And
`void foo(int *bar)`

@pounce First one passes `bar` as a reference, second one passes it as a pointer

@pounce Well, my first advice would be "use a good programming language".
If knuckles is a pointer, &knuckels lets you know where the pointer knuckles is stored (so you can add another pointer to it) and *knuckles lets you access the thing knuckles is pointing on.
If it's not a pointer, *knuckles might be wrong (unless you declare it as a pointer).