P
Pranab Mehta
Hi All,
I apologize if this has been brought up here before.
Searching through the newsgroup I found variants of
my question, but not exactly what I am thinking about.
If on a given platform, I am guaranteed that:
sizeof(integer) <= sizeof(void*)
Is it safe to store an int in a void* and cast it
back to int without truncating/losing data ?
Secondly, is the minimum size of a void* (or char*),
defined in the standards or is it entirely platform
dependant ?
TIA,
Pranab
I apologize if this has been brought up here before.
Searching through the newsgroup I found variants of
my question, but not exactly what I am thinking about.
If on a given platform, I am guaranteed that:
sizeof(integer) <= sizeof(void*)
Is it safe to store an int in a void* and cast it
back to int without truncating/losing data ?
Secondly, is the minimum size of a void* (or char*),
defined in the standards or is it entirely platform
dependant ?
TIA,
Pranab