0x004069f1 in Space::setPosition (this=0x77733cee, x=-65, y=-49) at space.h:44
0x00402679 in Checkers::make_move (this=0x28cbb8, move=...) at checkers.cc:351
0x00403fd2 in main_savitch_14::game::make_computer_move (this=0x28cbb8) at game.cc:153
0x00403b70 in main_savitch_14::game::play (this=0x28cbb8) at game.cc:33
0x004015fb in _fu0___ZSt4cout () at checkers.cc:96
0x004042a7 in main () at main.cc:34
您好,我正在为一门课编写游戏,但遇到了段错误。棋盘格被保存在一个二维数组中,因此有问题的位对于数组来说似乎是无效的 x/y。移动作为字符串传递,这些字符串被转换为整数,因此对于 x 和 y 不知何故为 ASCII NULL。我注意到在函数调用 make_move 中它说 move=...
为什么它说 move=...?另外,还有其他解决段错误的快速提示吗?我对 GDB 有点陌生。