Help translating C/C++ snippet to D

2012-07-02 Thread Dustin
Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0] ) * (sizeof( array ) != sizeof(void*) || sizeof( array[0] ) <= sizeof(void*))

Re: Help translating C/C++ snippet to D

2012-07-02 Thread nazriel
On Tuesday, 3 July 2012 at 02:34:04 UTC, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0] ) * (sizeof( array ) !

Re: Help translating C/C++ snippet to D

2012-07-03 Thread Tongzhou Li
On Tuesday, 3 July 2012 at 02:34:04 UTC, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0] ) * (sizeof( array ) !

Re: Help translating C/C++ snippet to D

2012-07-03 Thread Dustin
On Tuesday, 3 July 2012 at 04:09:22 UTC, nazriel wrote: On Tuesday, 3 July 2012 at 02:34:04 UTC, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (si

Re: Help translating C/C++ snippet to D

2012-07-03 Thread Mike Parker
On 7/3/2012 11:34 AM, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) / (sizeof( array[0] ) * (sizeof( array ) != sizeof(void*) || size

Re: Help translating C/C++ snippet to D

2012-07-03 Thread Dustin
On Tuesday, 3 July 2012 at 10:23:06 UTC, Mike Parker wrote: On 7/3/2012 11:34 AM, Dustin wrote: Hello, I'm trying to follow along with a C++ tutorial and translate it to D but I don't know C/C++ well enough to understand this #Define statement: #define ARRAY_COUNT( array ) (sizeof( array ) /