Trying to read data from an array. (help) (short code)
Code:
void read_file(FILE *fp,double arr[][5]); //book says to omit the row array, so thats why its [ ]
int main(int argc, char* argv[])
{
double arr[6][5];
FILE *fp;
fp=fopen(argv[1],"r");
void read_file(FILE*fp,double arr[][5])
{
int i=0;
int j=0;
while(fscanf(fp,"%lf%lf%lf%lf%lf",&arr[i][j])!=EOF)
{
i++;
j++;
}
Error: Line: 12 warning: format '%lf' expects a matching 'double *' argument [-Wformat]
I dont know what this means and how can i fix it?