【发布时间】:2021-04-30 03:04:08
【问题描述】:
我的教科书显示了要运行的这段 C++ 代码,但是当我在 net beans 上运行它时,它显示此错误 Exception in thread "main" ArrayIndexOutOfBoundsException: 0
#include <iostream>
using namespace std;
int main(void)
{
cout << "Hello world";
return 0;
}
【问题讨论】:
-
阅读 this C++ reference,你的 C++ 编译器的文档,也许 GCC 被调用为
g++ -Wall -Wextra -g。然后阅读调试器的文档,也许是GDB。您可能有兴趣在您的计算机上安装Debian 和GNU emacs。
标签: c++ arrays arrayindexoutofboundsexception