about LPVOID

how can I assign a value, from any type, to LPVOID?
I found these way:
*((string*)(varname)) = readstring;
but imagine that we don't know the varname pointed type? how can i do it?
closed account (E0p9LyTq)
http://stackoverflow.com/questions/8359752/casting-win32-find-data-to-lpvoid
i tryied:
varname=reinterpret_cast<LPVOID>(&readstring);
i don't get any value.

i tryied:
*reinterpret_cast<LPVOID*>(varname) =(char*) readstring.c_str();
but i don't any value too :(
what i'm doing wrong?
Last edited on
Topic archived. No new replies allowed.