Questions tagged [fopen]
The fopen tag has no usage guidance.
5 questions with no upvoted or accepted answers
0
votes
1
answer
676
views
How to open multiple files with fopen()
I was wondering if it's possible to dynamically pass through a string into fopen().
E.g.
String s = Depends-on-user-input.txt
And then is there a way to do
Fopen(s, "r");
I've tried to use ...
0
votes
0
answers
766
views
How does fopen() work with arrays?
For the following code:
#include <stdio.h>
int main(int argc, char *argv[1])
{
char *x = argv[1];
char a[5];
char b[5];
FILE *fn = fopen(x, "r");
FILE *fp;
for(int i = ...
0
votes
1
answer
513
views
PSET4: fgets returns odd characters instead of what's in .raw
I know the first few lines of 'card.raw' are (by opening in a texteditor):
bit.ly/18gECvy ˇÿˇ‡JFIFHHˇ€Cˇ€Cˇ¿Vˇƒ
Currently all I want the app to do is print back what's in the .raw file, and then ...
0
votes
1
answer
501
views
Pset5, speller 'could not open text'
So I wrote my load function and everything looks good, so I had it return true so I could move on and test other parts of the program. My problem is that speller.c won't load my text. I made a custom ...
0
votes
2
answers
91
views
In recover.c, how do you name each image file a seperate name?
Is this even necessary? Will the computer automatically name each file? Or will it use the name designated in fopen()?