C-binding external array.
ciechowoj via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 10 02:06:33 PDT 2016
On Tuesday, 9 August 2016 at 19:16:46 UTC, Ali Çehreli wrote:
> Well, C's array symbol is used as a pointer to the first
> element and D allows array indexing for pointers as well.
>
> Here is the C code:
>
> // c.c
> #include "stdio.h"
>
> int tab[64];
>
> int *get() {
> return tab; // or &tab[0]
> }
>
> void info() {
> printf("%p\n", tab);
> }
>
> [...]
>
The problem is, I do not have a control over the C source code.
More information about the Digitalmars-d-learn
mailing list