Results 1 to 1 of 1
- 07-31-2009, 07:24 PM #1Member
- Join Date
- Jul 2009
- Rep Power
How to transfer 1D array in JAVA to 3D array in C
Here is my problem:
I am working on a project which is writen by JAVA.
In JAVA, I have a 3D volume called velocity_java:
float  velocity = new float [NY][NX][NZ].
I need to use JAVA Interface to connect with my C program.
In my C program, I define velocity as 3D array velocity_c
float ***velocity; /*pointer*/
velocity = alloc3float(NY,NX,NZ). /*allocate memory*/
Could I directly do this? Or I need to redefine some arrays?
I got a suggestion said: in JAVA, define 1D array, but in C, define 3D array;
If not, how can I do this? I hope I describe the question clearly.
Thanka a lot.
- By Drukqs in forum New To JavaReplies: 5Last Post: 05-06-2009, 07:37 PM
- By Hannguoi in forum New To JavaReplies: 1Last Post: 03-31-2009, 07:40 AM
- By Joe2003 in forum Advanced JavaReplies: 5Last Post: 02-28-2009, 07:09 AM
- By zoe in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:12 AM
- By coco in forum New To JavaReplies: 1Last Post: 08-06-2007, 05:03 AM