Here is part of my programm that alyays errors

Started by
5 comments, last by Ademan555 18 years, 11 months ago
... 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> !
Advertisement
ok.
can you help me out?
Hehe... you didn't actually ask a question or ask for help in your OP. [wink]

Anyways... what error(s) are you getting?

- Jason Astle-Adams

line 51: Prase Error, expecting ")" or "," '(A)"'

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

- Jason Astle-Adams

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
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."

This topic is closed to new replies.

Advertisement