This doesn't work! You'll 99% likely to get a crash. Not to mention a warning or two.
yeah, I also thought so for a start (code is not very readable in a current state)
drater passes all needed vars as pointers so the fscanf call is OK
even it is seams to be opposite.
What can be done here - to change the names like
Code:
int fileScan(
FILE* fp,
char* cityName,
int* pPopulation,
int* pSquareMileage,
...
)
{
int readItems = fscanf(fp, "%s %d %d %d %d %d %d",
cityName, pPopulation, pSquareMileage, ...);
return readItems;
}