I want to make an array that holds a number of tile objects (called Tile) but it's saying that my constant int, numTiles, cannot be used as a... constant int... what?
The code I'm having issues with is here (error on line 5):
// Variables - Tilemap
const int tileSize = 32;
const int screenWidth = GetScreenWidth();
const int numTiles = screenWidth / tileSize;
Tile tilemap[numTiles];
The error I get is as follows: expression must have a constant value the value of variable "numTiles" (declared at line 14) cannot be used a constant
I'm not sure why I'm getting this issue as it looks like numTiles is definitely a constant int... Can someone explain what the problem is here?