pointer array?

seany via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 30 08:44:14 PDT 2014


Actually, I am writing a climate simulation software, and I would 
love to use D for parts of it.

However some code is in C, legacy code, and for speed resons. So 
in some cases, I would like to send a bunch of variables , ints, 
dubles and floats to an external C function. The thing is, I do 
not always know the number of variables, so my idea was to make 
an array of pointers (call it stack), and then send the pointer 
to the stack itself to the C function.

Because different stack configuration will call different C 
functions, and the function already knowes what to expect in this 
stack, I thought this was a good construction. If I am to create 
a set of base class, and array of it, and so much, it looks very 
complicated....

Of course, for more complicated objects, e.g., Groups, and other 
algebraic objects, I am using DLua.

Any suggestions.


More information about the Digitalmars-d-learn mailing list