February 25th, 2013, 10:02 PM
More on files.
I'm just testing to make sure I'm understanding this and I have a few questions.
char fname = "Success.txt";
RandW = fopen(fname,"w");
RandW = fopen(fname,"r");
printf("%d %d is in Success.txt",i,ii);
That's my code. It works, but I have to to ask. when using fscanf, is the only way you can find text in the file is if you add a variable(i,ii) to the program.
also, I saw a word called append as one of the second arguments in fopen(). What does append mean? Reading reads input, writing shows output but what's append? Does it check to make sure?
Comments on this post
February 26th, 2013, 02:27 AM
In addition to what Salem said, read also the documentation.
February 26th, 2013, 10:30 AM
If your compiler did not come with a help file, then Google on man page fopen for the documentation for fopen. You can also Google for the man pages of any other C Library function.