regan at netmail.co.nz
Wed Dec 28 03:25:25 PST 2011
On Sat, 24 Dec 2011 16:46:18 -0000, RenatoL <rexlen at gmail.com> wrote:
> int arr1 = [1,2,3,4,5];
> int arr2 = [1,2,3,4,5];
> "0 is ok to me but why "8"??
It's a quirk of D that int is a reference type, so you get the size of
the reference (as My Anonymous said, a length and pointer) whereas int
is a value type, so you get the size of the value.
It's the same as the following C..
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d-learn