C Warning:
Argument is incompatible with the corresponding format string conversion.
fscanf(outfile, "%f", &out[i][j][k]);
What is the issue here? The syntax is correct... does this occur because out is passed into the function as a pointer already? If so how do I work around it. (Currently I get garbage out and the fscanf doesn't appear to be working when I do a dump of the out array within the subprogram)
Here's more of the function code, the file is opened in the main program.
int InitFile(FILE *outfile, float *out)
--Declarations
Loop 1{
Loop 2 {
Loop 3 {
fscanf(outfile, "%f", &out[i][j][k]);
}
fscanf(outfile, "\n");
}
fscanf(outfile, "\n,\n");
}
I'm assuming the problem is because out is already declared as a pointer prior to the fscanf command, if I do the read in the main (w/o the pointer) program it seems to work correctly... however this piece of code will be used by many programs so I was hoping to make it a function so that it would be accessed in only one place if it needed to be edited.
Any help you can provide would be greatly appreciated.