Code:
sMap sMapPtr=new sMap[runtime number does not have to be constant];
I get an error with this method:
error C2440: 'initializing' : cannot convert from 'struct sMAP (*)[100]' 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:
VB Code:
Open "\hello.MAP" for Binary as #FF
Get #FF, ,MapWidth
Get #FF, ,MapHeight
ReDim tiles(MapWidth, MapHeight)
Get #FF, ,tiles
Close #FF
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...