Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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.

  • You cannot reply to this topic
2 replies to this topic

#1 Violento   Members   -  Reputation: 122

Like
Likes
Like

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

Sponsor:

#2 Jansic   Members   -  Reputation: 251

Like
Likes
Like

Posted 13 July 2001 - 04:13 AM

err...

  
#include <stdio.h>


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

Jans.

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

#3 Violento   Members   -  Reputation: 122

Like
Likes
Like

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.



PARTNERS