Converting a void* to a std::string
问题 After perusing the web and messing around myself, I can't seem to convert a void*'s target (which is a string) to a std::string. I've tried using sprintf(buffer, "%p", *((int *)point)); as recommended by this page to get to a C string, but to no avail. And sadly, yes, I have to use a void*, as that's what SDL uses in their USEREVENT struct. The code I'm using to fill the Userevent, for those interested, is: std::string filename = "ResumeButton.png"; SDL_Event button_press; button_press.type =