I’m just a beginner for C programming.
Can I ask a simple question ?
What’s the difference between (int) sizeof(void *) and int ?
ex)
#define ptrint int
#define PTRINT ((int) sizeof(void *))
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The first case acts as an alias for int so you can use ptrint instead of int.
The second case is the size of a pointer in bytes. So for instance on a 32 bit system it will return 4.