by fzammetti » Nov 24, 2004 @ 6:07pm
Hello all... Just dropped 3.50 into a project I was getting started under 3.01, and I have a problem I can't seem to overcome:
With this defintion:
CGapiSurface* pCurrentMapTiles[100];
This line throws an exception:
pCurrentMapTiles[1]->CreateSurface(NULL, pCGame->hInst, GFX_TILE_MAP_1_01, TEXT("GRAPHICS"));
It's an access violation, I believe because pCurrentMapTiles[1] is null.
Now, previously I had the following line right before that:
pCurrentMapTiles[1] = new CGapiSurface();
But now when I try that, I get:
error C2512: 'CGapiSurface' : no appropriate default constructor available
So, my question is:
Am I not dealing with surfaces properly? It used to work fine this way, and I kind of want to be dealing with pointers to surfaces all the time, so how do I now construct a CGapiSurface so that this will work (i.e., what do I pass to the constuctor? I don't see anything related to that in the samples or in the docs... am I missing it?)
Thanks!
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"