Skip to content

Instantly share code, notes, and snippets.

@messa
Created January 2, 2020 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save messa/ccd6342c6c7d3dda0a125cb0676c082d to your computer and use it in GitHub Desktop.
Save messa/ccd6342c6c7d3dda0a125cb0676c082d to your computer and use it in GitHub Desktop.
#include <cstdio>
#include <cstdint>
int main() {
int size = 10;
void *ptr = (void*) 1000;
unsigned *ptr2 = (unsigned*) ptr + size;
printf("ptr: %lu ptr2: %lu \n", (uintptr_t) ptr, (uintptr_t) ptr2);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment