【发布时间】:2016-04-10 10:07:11
【问题描述】:
我是 sdl 的新手。我正在制作二十一点游戏。我想制作一系列纹理。我想知道是否有人可以帮助我。这是我一直在尝试做的事情:
// array of textures for the extra player cards
SDL_Texture *hitCardsText[] = { NULL };
// this does not give me errors but i dont know if it is right
hitCardsText[0] = loadTexture(ren, cards[dynamicPlayerCards[0]]);
hitCardsText[1] = loadTexture(ren, cards[dynamicPlayerCards[1]]);
// i get an error here
SDL_DestroyTexture(hitCardsText[0]);
SDL_DestroyTexture(hitCardsText[1]);
我在上面的代码中指出了这个错误(我的文件称为 introSDL.exe btw):
introSDL.exe 中 0x6C78CE9A (SDL2.dll) 处的未处理异常:0xC0000005:访问冲突读取位置 0x00000050。
【问题讨论】: