How to I translate this C++ structure/array

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 3 03:56:43 PDT 2015


On Sunday, 3 May 2015 at 02:31:51 UTC, WhatMeWorry wrote:
> On Saturday, 2 May 2015 at 22:36:29 UTC, anonymous wrote:
[...]
>> [1] `Vertex triangle[6]` works, but please don't do that.
>
> Thanks. I assume you would prefer I use triangle[] but with 
> OpenGL calls the dynamic arrays don't work.  But maybe that is 
> another question for another time.

No no, Vertex[6] as a type is fine. It's about where you put that 
"[6]":
Vertex[6] triangle; /* D style - yay */
Vertex triangle[6]; /* C style - boo */


More information about the Digitalmars-d-learn mailing list