Here is the full compiling cpp code:#include <string>
#include <emscripten/bind.h>
#include <emscripten/val.h>
class Foo
{
public:
Foo(const char* a, const char* b, const char* c)
{
m_a = std::string(a);
m_b = std::string(b);
m_c = std::string(c);
}
private:
std::string m_a;
std::string m_b;
std::string m_c;
};
EMSCRIPTEN_BINDINGS(FooTest)
{
emscripten::class_<Foo>("Foo").
constructor<const char*, const char*, const char*>();
}ב-יום שני, 7 באוגוסט 2023 בשעה 08:03:35 UTC+3, Shlomi Fish כתב/ה: