C++ Program Access violation reading location 0x00000000

-6

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

main:https://pastebin.com/qEQD3rPg

c++
string
debugging
asked on Stack Overflow Mar 7, 2020 by imessiahs

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0