Maybe the title is a bit confusing. What I have is a struct typedef called sMap. I make a pointer of that datatype:
sMap *prgMap;
So later on I can create an array when I read my data. I have a seperate function outside the class where I define it (In my file loading class), so I have to pass the value to it, like so:
int LoadMap(sMap *prgMap){...}
So inside that function I read the size that I need to allocate from the file, then proceed to do as such:
prgMap = new sMap[(Header.size)];
Now my program compiles just fine, yet when I run it, I get a run-time crash. My debugger somehow isn't... well, debugging anymore. Any time I debug something I get a message about how there is no code here, do you want to view the disassembly? And it just worked the other day properly. That's a seperate issue, maybe someone could help me on that too.
At any rate, I'm wondering that maybe this method isn't being allocated properly due to me passing a pointer to a function and the function not allocating that original pointer the appropriate value? Thanks in advanced!
P.S. I'm switching over from a vector<> system to save overhead and whatnot, so it worked perfectly before this.