Re: D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
Thanks that was perfect. Also I am aware of the use of the 64bit numbers. Thank you for pointing it out though.

Re: D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
sorry thats: struct examplestruct {int* array;} int numar[50]; examplestruct parameters; parameters.array = numuar; When I do that I get type conflictions. Error: cannot implicitly convert expression (numar) of type int[50] to int*... I am not sure what setup I need to have here. Anyone know w

D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
Hello I need to pass a array in D to c. I have edited the code to the important parts. Normally in C I would just do this: void myFunction(int *array) { } Then pass it a array of whatever size. However I actually need the array to be in a struct so... typedef struct{int* array;} examplestruc

Re: Segfault in shared object when writeln

2014-06-03 Thread Harpo via Digitalmars-d-learn
Thanks! that was perfect. -Harpo

Segfault in shared object when writeln

2014-06-03 Thread Harpo via Digitalmars-d-learn
Hello I am having the following problem. I am trying to turn a program I have written into a shared object. I have ran into some problems however. When I use writeln instead of printf my program segfaults. I have edited the code to just the parts causing the problem. =main.d t