Jump to content
  • Advertisement
Sign in to follow this  
t5hoo6

Here is part of my programm that alyays errors

This topic is 4896 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

... VOID LOAD() { fopen(A); fwrite(W); fread(R); fclose(A); } ... Yes A, W, and R are written farther up in the program. I have never used this command befor and it is the only one erroring, Yes I rememberd to use #include <stdio.h> !

Share this post


Link to post
Share on other sites
Advertisement
You know that fopen() takes two arguments, not just one (as your example in the OP has)? See here for a reference on it.

I believe what you want may be:
fopen(A,"r+");


That's assuming that A is a variable containing a filename, and that you want read/write access to the file in question (which you appears to be true). Note that the file must already exist for this.

Share this post


Link to post
Share on other sites
Thats also assuming that A is a global variable, or Load is a member function and A is a member (in the OP's code).

to the OP: we're going to need to see more code unfortunately, namely, we need to see the scope of your variables

hope that helps
-Dan

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!