当前位置: 技术问答>linux和unix
打开文件就出现这个错误
来源: 互联网 发布时间:2017-01-15
本文导语: 139 FILE* fp = fopen("user.txt", "r"); (gdb) n Program received signal SIGSEGV, Segmentation fault. 0x00000000004012f0 in InitUserInfor () at memserver.cpp:139 139 FILE* fp = fopen("user.txt", "r"); | ...
139 FILE* fp = fopen("user.txt", "r");
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x00000000004012f0 in InitUserInfor () at memserver.cpp:139
139 FILE* fp = fopen("user.txt", "r");
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x00000000004012f0 in InitUserInfor () at memserver.cpp:139
139 FILE* fp = fopen("user.txt", "r");
|
0x00000000004012f0 in InitUserInfor () at memserver.cpp:139
是不是其他代码导致的?
楼主的代码贴全些
是不是其他代码导致的?
楼主的代码贴全些
|
那不是错误吧,楼主不会gdb调试?
|
判断fopen返回值了么。。。