Passing string from D to c++

deadalnix deadalnix at gmail.com
Tue Jul 30 22:44:18 PDT 2013


On Tuesday, 30 July 2013 at 20:57:55 UTC, Jesse Phillips wrote:
> On Tuesday, 30 July 2013 at 20:09:01 UTC, Milvakili wrote:
>
>> So I need to pass them as char*, I can not pass them as string?
>
> C++ doesn't have an immutable(char)[], it has char* and its own 
> string class. To communicate with it one must choose a type 
> both languages can understand, char* is that. D may be able to 
> get away with providing a C++ string, but I'm not familiar with 
> the integration layer.

const char*, char const* are equivalent to const(char)* in D.


More information about the Digitalmars-d mailing list