I have the following pieces of code (trimmed unnecessary parts) that are throwing an access violation. Unhandled exception at 0x011160A6 in Space Invaders.exe: 0xC0000005: Access violation reading location 0x00000004. The 0x00000004 concerns me.
The constructors of all objects do nothing, apart from initializing a reference.
According to cplusplus.com, it.find() should just return x.end() if the element is not found. I tried replacing the code in registerState to mRegistered = NULL; as a test, which also threw an access violation. It it my understanding that an access like this will just create that key/value pair with no problem.
mRegistered.count(id); throws the same exception.
This post has been edited by Mylo: 04 July 2013 - 07:23 PM