I have the following problem: My program is supposed to read data from files to an array. The files are numbered: capture[1].bmp,capture[2].bmp and so on. There are 24 of those files, and I really don't want to do the same step 24 times. Is there a way to write a loop along the lines of
In other words, is there a way to insert the "i" variable into the filename?Code:for (int i=1; i<25, i++); { fp=fopen("capture[i].bmp", "rb"); fread(&ch,sizeof(ch),1,fp); ..... }
Thank you for your insights.