I'm working on some old C code and I have this error occurring at runtime for reasons I cannot understand.
Unhandled exception at 0x00A11A7C in Program.exe: 0xC0000005: Access violation writing location 0x00000034.
It is this line that the debugger stops at that throws this error:
Node *car = (Node*)malloc(sizeof(Node));
What's odd is that the program was running just fine prior. This function is called many times and just prints out car facts for each one. Suddenly on a random car this line just crashes the execution.
This is the first line of the function. How is it possible for this to be happening?
User contributions licensed under CC BY-SA 3.0