0

我的教科书显示了要运行的这段 C++ 代码,但是当我在 net beans 上运行它时,它会在线程“main”ArrayIndexOutOfBoundsException:0 中显示此错误异常

#include <iostream>

using namespace std;

int main(void)
{ 
  cout << "Hello world";
  return 0; 
}
4

1 回答 1

2

c++中没有 java.lang.ArrayIndexOutOfBoundsException

该错误是因为 netbeans 正在运行另一个 java 项目。

右键单击 c++ 项目并单击“关闭其他...”然后您可以在正确的项目上工作。

于 2021-01-26T10:21:20.943 回答