In my code I have two char pointer, one to a string and the other as an error indicator for strtoumax() and strtod(). I am currently using the type size_t (aka unsigned long) to calculate the difference between them. Is there any type designed to specifically match pointer type size on every machine? Or do I have to check it myself with macros?
>Solution :
For pointer difference use ptrdiff_t. If you’re just trying to store a pointer as an integer, use uintptr_t (or intptr_t).