Here is part of my programm that alyays errors
...
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> !
Hehe... you didn't actually ask a question or ask for help in your OP. [wink]
Anyways... what error(s) are you getting?
Anyways... what error(s) are you getting?
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:
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.
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.
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement