char* pointers between C and D

ryuukk_ ryuukk.dev at gmail.com
Mon Jul 25 09:28:49 UTC 2022


I don't know what `writefln` is doing, but this following D code 
is the exact similar to your C code

```
import core.stdc.stdio;

void main()
{
     const(char)[] ch = "Hello World!";
     const(char)* p;

     p = &ch[0];
     p++;

     printf("%s", p);
}
```
`ello World!`


More information about the Digitalmars-d-learn mailing list