003.c #include<stdio.h>#include<stdlib.h>intmain(){chara[20];FILE*f;charfile_name[]="test3.txt";/* ファイルオープン */if((f=fopen(file_name,"r"))==NULL){fprintf(stderr,"%s\n","error: can't read file.");returnEXIT_FAILURE;}while(fscanf(f,"%s",a)!=EOF){printf("%s\...
https://jp.mathworks.com/help/releases/R2020b/compiler_sdk/cxx/calling-a-shared-library.html
最後に、この関数の第 4 引数はデータを読み込むべきファイルへのFILEポインタです。以下の例では、input.txtという名前のファイルを開いて任意のバイトを書き込む。その後、ファイルを閉じて、読み込みのために再びファイルを開きます。