I'm writing a program and am having trouble using the scanf and fopen working together.
From what I can tell my erroneous lines seems to be:
FiLE * DataFile
DataFile = fopen("StcWx.txt","r");
scanf(DataFile, "%i %i %i %.2f %i %i", &Year, &Month, &Day, &Precip, &High, &Low);
The file it opens from has a list of weather data that looks like this:
1944 4 12 0 58 24
1944 4 13 0.4 58 29
1944 4 14 0.54 42 29
1944 4 15 0 43 27
(Those spaces are tabs)
The error that is displayed is "[Warning] passing arg 1 of `scanf' from incompatible pointer type"
Can anyone help me?