On Wednesday, 26 February 2014 at 11:21:37 UTC, bearophile wrote:
Szymon Gatner:
That would be just it:
import dchip.all;
void main()
{
cpBody* bodies[];
auto b = cpBodyNew(0, 0);
bodies ~= b;
}
where dchip is pulled using dub. As described earlier,
wrapping cpBody* in another struct or
On Wednesday, 26 February 2014 at 11:22:00 UTC, Tobias Pankrath
wrote:
On Wednesday, 26 February 2014 at 11:07:44 UTC, Szymon Gatner
wrote:
On Wednesday, 26 February 2014 at 10:59:39 UTC, bearophile
wrote:
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please re
Szymon Gatner:
That would be just it:
import dchip.all;
void main()
{
cpBody* bodies[];
auto b = cpBodyNew(0, 0);
bodies ~= b;
}
where dchip is pulled using dub. As described earlier, wrapping
cpBody* in another struct or Tuple works.
Now you have to remove all imports from the code
On Wednesday, 26 February 2014 at 11:07:44 UTC, Szymon Gatner
wrote:
On Wednesday, 26 February 2014 at 10:59:39 UTC, bearophile
wrote:
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please reduce your code as much as possible, and show the
whole compilable reduc
On Wednesday, 26 February 2014 at 10:59:39 UTC, bearophile wrote:
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please reduce your code as much as possible, and show the whole
compilable reduced buggy program here.
Bye,
bearophile
That would be just it:
imp
Szymon Gatner:
Is there a different array declaration syntax for pointers?
There is not. But the D-style syntax is preferred for arrays.
Bye,
bearophile
Szymon Gatner:
I want to keep a list of pointers-to-C-struct but this line:
Please reduce your code as much as possible, and show the whole
compilable reduced buggy program here.
Bye,
bearophile
On Wednesday, 26 February 2014 at 10:01:53 UTC, Tobias Pankrath
wrote:
On Wednesday, 26 February 2014 at 09:56:39 UTC, Szymon Gatner
wrote:
I want to keep a list of pointers-to-C-struct but this line:
cpBody* cpBodies_[];
which I use as a workaround. I am using DMD 2.065.
cpBody*[] cpBodies;
On Wednesday, 26 February 2014 at 09:56:39 UTC, Szymon Gatner
wrote:
I want to keep a list of pointers-to-C-struct but this line:
cpBody* cpBodies_[];
which I use as a workaround. I am using DMD 2.065.
cpBody*[] cpBodies;