default initialization of char arrays

Max Samukha maxsamukha at gmail.com
Tue Sep 30 13:15:11 UTC 2025


On Monday, 8 September 2025 at 15:42:27 UTC, Walter Bright wrote:

>
> The answer is:
> ```
> __gshared char[10] xxx = 0;
> ```

I've just run into this:

```
enum Type: char[4]
{
     invalid = 0,
}
```

Error: cannot implicitly convert expression `0` of type `int` to 
`char[4]`

Should work, I guess.


More information about the Digitalmars-d mailing list