Is there a way to read a text file if you are using a string from a structure as the text file to open?
For instance, I have a program that searches for text files and as it searches it stores the name of the text in a structure.
Later I want to be able to open this text file for reading.
I have only seen instances where the text file is already given to you.
like this
Is there a way I can read using the .name component of this structureCode:readfile = fopen("textfile.txt","r");
Any help, I would appreciate greatlyCode:typedef struct { char name[30]; int position; int chars; int newlines; }TXT; int main(void) { FILE *readfile;



LinkBack URL
About LinkBacks


