I'm coding a program that stores records of first and last names. For some reason, I keep getting an access violation no matter what I try to fix.
The error specifically states: Exception thrown at 0x7905F2F0 (ucrtbased.dll) in listies.exe: 0xC0000005: Access violation reading location 0x00000000.
The line that is throwing it is:
if ((strcmp((char*)first->next, r.lastname) > 0)) {
Here is a link to the .cpp file containing all the code in its entirety: https://pastebin.com/yq57NDic
In addition, so you will be able to recreate the error on your own, attached is the main.cpp and list.h (header file) for the program as well.
header: https://pastebin.com/pDQMEYez
User contributions licensed under CC BY-SA 3.0