"Hello world" exercise in c++ throws ArrayIndexOutOfBoundsException

134 Views Asked by At

My textbook showed this piece of C++ code to run however when I run it on net beans it displays this error Exception in thread "main" ArrayIndexOutOfBoundsException: 0

#include <iostream>

using namespace std;

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

There are 1 best solutions below

0
On

there is no java.lang.ArrayIndexOutOfBoundsException in c++

that error is because netbeans is running another java project instead.

rightclick on the c++ project and click on "close others..." then you can work on the right one.