C style array declaration.
Aedt
adnansignsup at gmail.com
Mon Mar 26 10:16:55 UTC 2018
I'm a big fan of betterC. In C, you can initialize an array
without specifying the length like this
int ia[ ] = {0, 2, 1};
What is the translation of this? Note that int[] is a different
type than C's arrays.
https://dlang.org/spec/interfaceToC.html#data_type_compat says
there are no equivalent to this. What's the workaround?
Also, is it possible to retrieve the pointer of the sequence of
actual data from std.container.array? If all fails I'd like to
use this container.
More information about the Digitalmars-d-learn
mailing list