Arrray sizeof

RenatoL rexlen at gmail.com
Sat Dec 24 08:46:18 PST 2011


snippet:


int[] arr1 = [1,2,3,4,5];
int[5] arr2 = [1,2,3,4,5];
writeln(arr1.sizeof);
writeln(arr2.sizeof);

Output:
8
20

"0 is ok to me but why "8"??


More information about the Digitalmars-d-learn mailing list