hello
i use intel compiler visual stdio(intel parallel 2015) to compile my project
console ( c source )
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
//#include <iostream>
//#define readfile readfile_
extern void readfile(char*, int*);
int main()
{
int n, count;
char Fname[9];
char Name[10];
strcpy(Fname,"AMIN.for");
fprintf( stderr, "%s\n", Fname);
readfile( Fname, &n, strlen(Fname));
fprintf( stderr, "n = %d\n", n);
// fprintf( stderr, "%s\n", Name);
getch();
getch();
return 0;
}
subroutine ( Lib fortran )
subroutine readfile( fname1, m )
character fname1*(*)
integer m
integer iounit,i
iounit=15
write(*,*) fname1
c10 format (a9)
open(iounit,file = fname1,action='read')
read (iounit,*) m
c20 format (i10)
write(*,*) m
close(iounit)
return
end subroutine
this is my project and i don't have a problem
in this line i have a great problem
readfile( Fname, &n, strlen(Fname) );
i need to change line ( is necessary for me)
readfile( Fname, &n);
is it possible? how to call without lenght character or how to calling convert to run and compile it correctly?
In addition i change "name case interpretation" to "lowercase"
when i compile it , my project cann't open file . i don't khnow why.
how to change setting vs2012 toget to it?
Thanks