I have some problems with combination between Fortran and C++> Hence I can not link the data between two codes. Please take a look on my source code and help me to clarify the problem.
This is my source
--- Code Fortrant: source_f.f -----
subroutine loadarr2(nx,ny,arr)
integer nx,ny,i,j,temp
real arr(nx,ny)
temp=0
write(*,*)'Print to Screen Array 2D in Fortran'
write(*,*)'nx= ',nx,'\tny= ',ny
do i=1,nx
do j=1,ny
write(*,*)arr(i,j)
enddo
enddo
end
subroutine rearr2(nx,ny,arr)
integer nx,ny,i,j,temp
real arr(nx,ny)
nx=3
ny=3
temp=0
do i=1,nx
do j=1,ny
temp=temp+1
arr(i,j)=temp
enddo
enddo
end
subroutine loadarr3(nx,ny,nz,arr)
integer nx,ny,nz,i,j,k,temp
real arr(nx,ny,nz)
temp=0
write(*,*)'Print to Screen Array 3D in Fortran'
write(*,*)'nx= ',nx,'\tny= ',ny,'\tnz= ',nz
do i=1,nx
do j=1,ny
do k=1,nz
write(*,*)arr(i,j,k)
enddo
enddo
enddo
end
subroutine rearr3(nx,ny,nz,arr)
integer nx,ny,nz,i,j,k,temp
real arr(nx,ny,nz)
temp=0
nx=4
ny=4
nz=4
do i=1,nx
do j=1,ny
do k=1,nz
temp=temp+1
arr(i,j,k)=temp
enddo
enddo
enddo
end