getting Win32 Messagebox to work

Mark Moorhen Mark at Moorhen.com
Fri Oct 26 12:46:47 UTC 2018


On Friday, 26 October 2018 at 12:39:13 UTC, rikki cattermole 
wrote:
> On 27/10/2018 1:36 AM, Mark Moorhen wrote:
>> [...]
>
> alias string = immutable(char)[];
>
> A slice (string in this case) is a length + pointer pair. You 
> need to add .ptr on content with a cast to get to const(char)*.

Thanks for your quick reply.

However when I do:
cast(const(char)*) content.ptr;

I get a error:


HelloMsg.d(9): Error: 
`cast(const(char)*)cast(immutable(char)*)content` has no effect


More information about the Digitalmars-d-learn mailing list