I have a non-.NET C++ class as follows:
Foo.h:
namespace foo {
const static std::string FOO;
...
}
Foo.cc:
using namespace foo;
const std::string FOO = "foo";
I want to expose this for use in a C# application, but I keep getting errors about mixed types when I try the following:
FooManaged.h:
namespace foo {
namespace NET {
public ref class Foo {
public:
const static std::string FOO;
}
}
}
FooManaged.cc:
using namespace foo::NET;
const std::string Foo::FOO = foo::FOO;
What s the right way to translate an unmanaged string constant to a managed string constant?