I have a bunch of files systematically numbered like Mesh0Coord.dat
, Mesh0Elem.dat
, Mesh1Coord.dat
, Mesh1Elem.dat
, etc. This is what I want to do:
int ID;
FILE *fp;
ID = 0; /* could be 0, 1, 2, etc. and so on for the names of the files */
fp = fopen(“Mesh[ID]Coord.dat”, “r”);
The Mesh[ID]Coord
means that the ID integer should be inserted there. Any tips?