FILE *mapfile doesn't work!!
A while ago i started a project. I wanted to make the program in several files, like main.c, input.c, display.c etc.. (and the header-files). Before this i''ve just coded one file, and compile that one file. I got the files working together, but there''s a problem when i''m opening the map-files. I use the same load_map function that worked perfectly in my last project, so there should be nothing wrong with the function code.
It gives me errors with these commands:
FILE *mapfile;
" Parse error before * "
" Data definition has no type or storage class "
and..
mapfile = fopen(filename,"rb+");
" Assignment makes pointer from integer without a cast "
Both of those are in the load_map() function that i use loading the map. And the function is in file.c, that i use for all the file i/o-functions. It seems that it doesn''t somehow recognize the FILE. How can i define mapfile, that i could use it in the fopen()-function? Do i have to use some header-file or what?? I''m confused..
-Hombre Violento
err...
At the top of you "file.c" file????
Jans.
Edited by - jansic on July 13, 2001 11:14:46 AM
#include <stdio.h>
At the top of you "file.c" file????
Jans.
Edited by - jansic on July 13, 2001 11:14:46 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement