Another c++ error

Started by
27 comments, last by Zahlman 12 years, 6 months ago
Well, one problem is with your class_player.h file#ifndef CLASS_PLAYER_H
#define CLAS_PLAYER_H
Advertisement
Whoa how could I miss that. Well that about dos it for all the help I need for now. Thanks again for all of your help and for being patient with me.
gahh. now i get this after my project compiles.
Unhandled exception at 0x76ed15ee in game.exe: 0xC0000005: Access violation reading location 0x00000008.

gahh. now i get this after my project compiles.
Unhandled exception at 0x76ed15ee in game.exe: 0xC0000005: Access violation reading location 0x00000008.


You need to run it in the debugger to see where this happens and go from there.
The compiler keeps bringing up crtexe.c it's not even part of my project.
Ive looked around and i think it may be a null pointer but Im not sure what that is.
It is a null pointer. The null pointer is typically 0x00000000, small offsets from this are not uncommon when accessing a member of a structure.

The location of the crash can (and often will) be removed from the place that is causing the crash to occur - the place that takes a null pointer an d passes it to some function.

Have you investigated the call stack in the debugger? You should be able to use this to trace back to one of your functions that is calling into the C runtime (explicitly, or implicitly through SDL or the C++ runtime, for example). You can then inspect the variables in the debugger, looking for ones that are null or close to null.
Ok well i found the memory window and found the address and all that came up where a bunch of question marks. Does this mean anything.
You need to be compiling in debug mode to use the debugger.

This topic is closed to new replies.

Advertisement