I'm working on a game that uses a class which creates a matrix for a bunch of tiles. What i want to do, is to be able to pass to the class, when it is created, the xtiles, and ytiles, for example:
int *matrix;
void setup(int xtile, int ytile)
{
matrix=new int[ytile] [xtile];
}
void main()
{
setup(30,40);
}
and that would resize the array to be 30 across, and 40 down, but when i compile in Visual C++, it says something about how it can't convert from one int to another.......if you know how to fix this, I would be greatful for a reply, thank you!