[Solved] How to write if statements involving pointers/vectors?

[ad_1]

Here’s a brief table of how pointers map to normal (i.e. non-pointer variables) and vice versa (assume you’ve declared the pointer as int *varptr and your regular variable as int v):

Dereferencing a pointer: *varptr v

Passing the variable by reference: varptr &v

Leave a comment if you have further questions and I’ll do my best to provide more information.

1

[ad_2]

solved How to write if statements involving pointers/vectors?