is my compiler broken?
If I add the printf (can even place it somewhere else) in the following code, then the application works totally fine. If I remove the printf it crashes immediately.
//
// Allocate SDL_Surface array
//
TileMap->pTiles = (CORE_TILE*)malloc(sizeof(CORE_TILE) * TileMap->Num);
if (TileMap->pTiles == NULL) {
SDL_FreeSurface(Image);
free(TileMap);
return NULL;
}
//
// Store tiles
//
for (i = 0; i < TileMap->Num; ++i) {
printf("%d\n", 0);
TileMap->pTiles[i]->Image = 0;
}
Unfortunately, I switched from vscode to notepad++, because vscode misses some code editing features I need. And thus I have no IDE for debugging in order to see what's exactly going on o.o
https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16
CLion is the best IDE for C/C++ development so far
Обсуждают сегодня