Last active
December 27, 2016 18:40
-
-
Save phoddie/fe3ae5d9f1a36d58d0f31aa999740587 to your computer and use it in GitHub Desktop.
Useful C types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uintptr_t - integer type large enough to hold pointer | |
#include "stdint.h" | |
void *xp = // some pointer | |
uintptr_t xi = (uintptr_t)xp; | |
int *xp2 = (void *)xi; | |
// xp == xp2 on all systems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment