ok, i have no idea how to read from a file, and ive never gotten it to work. here is my code, maybe you guys can make something of it. (its probably a very simple thing, knowing me.)
#include <stdio.h>
#include <ctype.h>
int main(){
int c;
FILE *fp;
char filename[81];
gets(filename);
fp = fopen(filename, "r");
while ((c = fgetc(fp)) != EOF)
putchar(toupper(c));
fclose(fp);
return 0;
}
most of this i got from a book. i edited the file to the bare minimum. i put in a string, and it opens the file of that string, but it never can open the file. that code gives an illegal operation, but i used to have it to where it would give error messages if it couldnt find the file, and it would give it every time.