I'm storing a pointer to a function as a string:
//callback = std::function<void()> callback
std::stringstream cbPtrToString;
cbPtrToString << &callback;
std::string prtString = cbPtrToString.str();
How can I convert prtString back into a callable function? I've tried this below, but it doesn't do what I thought it would do.
std::stringstream stringToPtr(ptrString);
void* result;
stringToPtr >> result;
result();