Skip to content

Instantly share code, notes, and snippets.

@Algogator
Last active September 8, 2020 21:43
Show Gist options
  • Save Algogator/1d682f69c805a59892a950ab99c13573 to your computer and use it in GitHub Desktop.
Save Algogator/1d682f69c805a59892a950ab99c13573 to your computer and use it in GitHub Desktop.
Pointers in C++
pointer var = address
* = &
int val = 10;
int *p;
p = &val;
// *p is val p is pointing to
// p is address inside p
// &p gives address of p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment