how would i use fopen() to accept an argument from a function (c programming) -
example:
void readdoc(file *doc_file) { } how can fopen read doc_file when notation requires know document name before hand because in case file name argument in readdoc function.
you don't need fopen because fopen used open file , homecoming file* file. in code have shared, seem have file* parameter. need utilize read (fread,fscanf,fgets etc.) functions read file. however, need ensure fopen called on file need read , file* returned passed readdoc function.
c fopen
No comments:
Post a Comment