csEnd(代码):代码> CS_MAX_CODE?;143373032 999 程序退出,代码为 0377
csEnd(code): code > CS_MAX_CODE?; 143373032 999 Program exited with code 0377
当我在NS2上运行LEACH时,我得到这个错误
csEnd(code): code > CS_MAX_CODE?; 143373032 999
Program exited with code 0377.
我知道程序中有一些问题,但我不知道如何找到它们。我甚至尝试在gdb中运行程序,但是where
命令给了我No Stack Trace
请告诉我如何调试并知道问题的具体原因?
so figure it out
我在LEACH
中获得了以下代码所导致的以上消息inline double csEnd(int code)
{
if (code > CS_MAX_CODE || code < 0)
{
fprintf(stderr, "csEnd(code): code > CS_MAX_CODE?; %d %dn", code, CS_MAX_CODE);
exit(-1);
}
return cs_end_[code];
}
发生这种情况是因为我设置了垃圾代码
int code;
// some other code
setCode(code);
相关文章:
- 在VS代码中交叉编译Windows与Linux上的MinGW的SDL程序
- 为什么这个 c++ 代码打印出长度 5,当我打印出字符串时,程序会自动终止?
- 在程序中编写脚本来编写和编译代码
- 用于将C++代码转换为 Web 程序集的脚本未终止
- C++程序打开时立即运行的代码
- 不必要的C++代码最终会出现在我完成的程序中吗?
- 为什么我的C++程序的程序集输出充满了 .ascii,没有汇编代码?
- 我可以在 iOS 或 mac 应用程序中使用C++代码吗?
- 为什么C++程序在太大时返回代码而不是答案?
- 从运行服务的应用程序代码中提取窗口句柄
- 代码编译没有任何输出,入门程序
- 使用本机 C++ 应用程序中的 C# 代码
- 为什么在堆栈和堆上创建变量会产生相同的程序集代码?
- bash脚本在使用popen()时不返回代码以调用C ++程序
- 无法在 VS Code 上使用代码运行程序运行C++文件
- 程序显示以退出代码 0; 结束
- 代码块C++程序未运行
- 当我选择大于 720 的矩阵大小时,程序退出并显示错误代码.可能是什么原因?
- C++ 程序在代码块 IDE 中不起作用
- 优化我的代码/程序,我哪里出错了