C++ fortran mixed programming: allocatable array
I am now confronted a problem in my CFD programme. How to transfer an allocatable array (double ** A, A[i][j]) as argument from C++ to Fortran? The following code doesn't work. ----------C.cpp----------- double **A;
myf(A,2,2); --------------------- ----------F.for----------- subroutine myf(A,m,n) real*8 A(m,n) .... --------------------- |
Re: C++ fortran mixed programming: allocatable arr
You can't do it. Your C array comprises an array of pointers, each pointing to a 1D array of doubles, none of which is guaranteed to be anywhere near any other one.
|
All times are GMT -4. The time now is 11:58. |