clarify whether ID is the int you are talking about
- M.M
3 Answers
1
votes
You should cast data to int * first, then derefer it:
printf("%d\n", *(int *)data);
0
votes
You need to typecast your void* to int* first. Then you need to print value of that pointer means need to dereference it.
printf("Data: %d\n", *((int *)data));
0
votes
ya just cast and dereference
printf("%d\n", *(int *)data);
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
*(int*)data, if initial type was int. - keltarIDis theintyou are talking about - M.M