小编Ral*_*alf的帖子

获取地址错误时无法访问内存

我收到此错误:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000400f8b in encryptFile (
inPath=<error reading variable: Cannot access memory at address 0x7fffff63a0f8>, 
outPath=<error reading variable: Cannot access memory at address 0x7fffff63a0f0>, 
key=<error reading variable: Cannot access memory at address 0x7fffff63a0e8>) at    main3.cpp:7
7   bool encryptFile(std::string& inPath, std::string& outPath, unsigned char * key) {
Run Code Online (Sandbox Code Playgroud)

这是代码:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000400f8b in encryptFile (
inPath=<error reading variable: Cannot access memory at address 0x7fffff63a0f8>, 
outPath=<error reading variable: Cannot access memory at address 0x7fffff63a0f0>, …
Run Code Online (Sandbox Code Playgroud)

c++ gdb

0
推荐指数
1
解决办法
3850
查看次数

标签 统计

c++ ×1

gdb ×1