I get an error with this method:
sMap sMapPtr=new sMap[runtime number does not have to be constant];
error C2440: 'initializing' : cannot convert from 'struct sMAP (*)' to 'struct sMAP'
No constructor could take the source type, or constructor overload resolution was ambiguous
Is it really so hard to open a binary file, dimension an array of sMAP structs to the width and height variables in the file?
in VB, the code would be like this:
Open "\hello.MAP" for Binary as #FF
Get #FF, ,MapWidth
Get #FF, ,MapHeight
ReDim tiles(MapWidth, MapHeight)
Get #FF, ,tiles
I just wanted that code in C, and I've already found out the opening and the put and get syntax in C, but the redimensioning of such an array is a bit tricky for me...