Results 1 to 1 of 1
- 07-31-2009, 06:24 PM #1
Member
- Join Date
- Jul 2009
- Posts
- 1
- Rep Power
- 0
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.
Similar Threads
-
array or array list?
By Drukqs in forum New To JavaReplies: 5Last Post: 05-06-2009, 06:37 PM -
How to add an integer to a array element and the store that backinto an array.
By Hannguoi in forum New To JavaReplies: 1Last Post: 03-31-2009, 06:40 AM -
String array to byte array?!
By Joe2003 in forum Advanced JavaReplies: 5Last Post: 02-28-2009, 06:09 AM -
Help with string and array in java
By zoe in forum New To JavaReplies: 1Last Post: 08-07-2007, 06:12 AM -
Help with array in java
By coco in forum New To JavaReplies: 1Last Post: 08-06-2007, 04:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks