October 17, 2006 [Issue 439] New: Cannot use an array as new[] size argument. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=439 Summary: Cannot use an array as new[] size argument. Product: D Version: 0.169 Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: godaves@yahoo.com const size_t[] arr = [ 1,2,3 ]; void main() { int[] ar2, ar3; ar2 = new int[arr[2]]; // "need size of rightmost array, not type arr[2]" ar2 = new int[](arr[2]); // Ok size_t i = arr[2]; ar2 = new int[i]; // Ok } -- |
October 17, 2006 [Issue 439] Cannot use an array as new[] size argument. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=439 benoit@tionex.de changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from benoit@tionex.de 2006-10-17 05:28 ------- *** This bug has been marked as a duplicate of 411 *** -- |
Copyright © 1999-2021 by the D Language Foundation