Why can't we use strings in C++ methods?
Dadoum
dadoum at protonmail.com
Sat Nov 4 12:32:27 UTC 2023
On Saturday, 4 November 2023 at 12:07:12 UTC, Imperatorn wrote:
> [...]
>
> We can just assume what you're doing on the C++-side. Are you
> using std::string?
>
> You could try as a pointer + length and it might work, but
> without seeing your complete code it's quite hard to know what
> you want to do.
I will use whatever D gives me in the C++ header, because in fact
I am using Swift on the other side, so using std::string isn't
useful. I already made a conversion function from Swift strings
to D strings when they are represented with C linkage.
More information about the Digitalmars-d-learn
mailing list