Re: How do you take the address of a struct in D?

2016-02-05 Thread Enjoys Math via Digitalmars-d-learn
On Friday, 5 February 2016 at 23:53:15 UTC, Enjoys Math wrote: SDL_RenderCopy(...) takes two pointers to SDL_Rect's, I have a property method in another class returning the SDL_Rect equivalent of a Box (my structure). Taking ampersand on the left of a call to the property does not give the

How do you take the address of a struct in D?

2016-02-05 Thread Enjoys Math via Digitalmars-d-learn
SDL_RenderCopy(...) takes two pointers to SDL_Rect's, I have a property method in another class returning the SDL_Rect equivalent of a Box (my structure). Taking ampersand on the left of a call to the property does not give the address (&).

Re: How do you take the address of a struct in D?

2016-02-05 Thread Ali Çehreli via Digitalmars-d-learn
On 02/05/2016 03:53 PM, Enjoys Math wrote: SDL_RenderCopy(...) takes two pointers to SDL_Rect's, I have a property method in another class returning the SDL_Rect equivalent of a Box (my structure). Returning by reference or by value? > Taking ampersand on the left of a call to the property