•      Sign In
• Create Account

## FILE *mapfile doesn't work!!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Violento  Members

Posted 13 July 2001 - 03:46 AM

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..

### #2Jansic  Members

Posted 13 July 2001 - 04:13 AM

err...

  #include

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

Jans.

Edited by - jansic on July 13, 2001 11:14:46 AM

### #3Violento  Members

Posted 13 July 2001 - 04:40 AM

aww crap... I knew i forgot something.. =)
I thought that fopen() was allegro.h''s function..

Well, thanks for reminding me!

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.