void main() {
int frame_number = 0;
do {
char *filename = "";
strcpy(filename, "frame_");
char *frame_id = "";
itoa(frame_number, frame_id, 10);
strcat(filename, frame_id);
strcat(filename, ".bmp");
FILE* f = fopen(filename, "rb");
if (!f) {
printf("Could not read!");
system("Pause");
}
else
printf("Read!");
fclose(f);
frame_number++;
} while (frame_number < 20);
}
每当我运行它时,我都会收到错误access violation writing location
!!!文件夹中有大约 40 张图像。如何解决这个问题?