|
[Sponsors] |
C++ fortran mixed programming: allocatable array |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 19, 2005, 00:32 |
C++ fortran mixed programming: allocatable array
|
#1 |
Guest
Posts: n/a
|
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) .... --------------------- |
|
April 19, 2005, 12:11 |
Re: C++ fortran mixed programming: allocatable arr
|
#2 |
Guest
Posts: n/a
|
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.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
An unknown array definition in fortran | morteza08 | Main CFD Forum | 0 | June 20, 2011 05:32 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
largest one-dimensional array in fortran 77 | yfyap | Main CFD Forum | 20 | November 2, 2008 22:57 |
Compaq Visual Fortran - array, debug | CFD Student | Main CFD Forum | 0 | May 10, 2008 08:59 |
Array Visualizer in Visual Fortran | Krishna | Main CFD Forum | 0 | December 6, 2004 04:23 |