🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

FILE *mapfile doesn't work!!

Started by
1 comment, last by Violento 22 years, 11 months ago
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
Advertisement
err...

  #include <stdio.h>  


At the top of you "file.c" file????

Jans.

Edited by - jansic on July 13, 2001 11:14:46 AM
aww crap... I knew i forgot something.. =)
I thought that fopen() was allegro.h''s function..

Well, thanks for reminding me!
-Hombre Violento

This topic is closed to new replies.

Advertisement