On 12/13/2016 12:30 PM, Ali wrote:
> foreach (i, room; rooms) {
> data[i].room = &room;
That is the address of the local variable room. You need to use 'ref' there:
foreach (i, ref room; rooms) {
> - Ali
Ali
"the real one :o)"
Ali Çehreli via Digitalmars-d-learn Tue, 13 Dec 2016 13:36:18 -0800
On 12/13/2016 12:30 PM, Ali wrote:
> foreach (i, room; rooms) {
> data[i].room = &room;
That is the address of the local variable room. You need to use 'ref' there:
foreach (i, ref room; rooms) {
> - Ali
Ali
"the real one :o)"