IMAGE 类型数组最大是多少?

-1

VC6 定义 IMAGE 数组 wall[1000],load加载图片提示出错。请问是什么原因,怎么解决?

#include <graphics.h>
#include <time.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <tchar.h>
#include <string>
using namespace std;   

IMAGE  wall[1000]     

void  load()
{
    char filename1[100];
	for (int i = 0; i < 1000; i++)
	{
		sprintf_s(filename1, "./tile/wall%d.bmp", i);
		loadimage(&wall[i], filename1);
	};
}

void show()
{
	for (int i = 0; i < 1000; i++)
	{
		putimage((i % 20)*64, i/10*64 , &wall[i], SRCCOPY);
	};
}
int main()
{
	initgraph(1000, 1000);
    load();
	while (true)	// 按任意ESC键退出
	{
     	show();
    }    //END OF while();
	 closegraph();
}
ava
Netman

2024-3-10

提示出错?  IMAGE wall[100] 少了个分号 -  xiongfj ◑◑  2024-3-10
技术讨论社区