Hello I have been following along with this Handmade Hero game and I am at the end of Day 4 I an unable to run the program because of an this error "Exception thrown at 0x013B56B2 in win32_handmade.exe: 0xC0000005: Access violation writing location 0x0390A000.
Unhandled exception at 0x013B56B2 in win32_handmade.exe: 0xC000041D: An unhandled exception was encountered during a user callback."
There is also these in the autos:
Pitch 5696 int
+ Row 0x03ef5140 "" unsigned char *
I am at a complete loss at what to do, I have already asked two different sites and both times didn't get a single response so any help would be greatly appreciated.
The exception occurs right at the last line of this code sample
where did row get its memory so that Row+= pitch works?
The answer is Row is Bitmapmemory, which is a global, which has not been assigned a valid value.
also make sure pitch is always correct, or it may shoot Row out of bounds.
it is unusual to just declare void pointers. Usually they are just a transport so you can pass an unknown 'thing' into a function that can then (somehow) un-thing it back into something concrete. For example, many thread libraries take a void * to the thread function's arguments, which can be anything, so its just a pass-through.
typedefs for the built in integer names is unhelpful as well, people now have to relearn YOUR version on top of microsoft's version on top of C++ and c99 and whatever else versions. There are probably 150 names for 4 things (1,2,4,8 byte ints) already!!!