0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00

时间:2024-04-12 21:07:30

0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00

C++建立链表时动态申请内存出现内存异常报错:
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00
原因:在结构体Book中默认赋初值时string类型数据为空导致的
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00
string类型数据初值不能为空,可改为
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00
或者不赋初值
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00

或者用构造函数赋初值:
0x7b38f6e0 (ucrtbased.dll)处(位于.exe 中)引发的异常: 0xc0000005读取位置 0x00