Original Post
I'm getting the warning: warning C4312: 'type cast' : conversion from 'int' to 'void *' of greater size At the moment I'm not too bothered about 64-bit portability, but if I want to convert my program to 64 bit in future, I want to know if I can still do this. What I have is a class with a member of type (void *). The member is used to store custom data for passing to another function, where it's converted back to the appropriate type. In this case, I'm converting from an int to a (void *), then in the function converting back to an int. Is there a better way which is similar to this to store custom data and pass it to a function?