I am trying to send string from C++ to JS using emscripten but I'm not able to convert it appropriately in JS.
C++
EMSCRIPTEN_KEEPALIVE const char* accessDetails()
{
return func().c_str();
}
func returns std::string.
I'm getting some garbage value number. How can I get the string in JS?
Thanks in advance.