1

I am making a program to compute minimum cost routes, using minimal spanning trees. I did my implementation in c + + but I could not make a graphical interface to read the input file, so I decided to pass it to Java language and create the interface using Netbeans. Herés my code in c++:

4

2 に答える 2

2

次の配列がどこで初期化されているかわかりません。

public static int matrizPesos[][];
public static char arbolMinimal[];
public static int distancia[];
public static int linkeoNodos[];

しかし、それらはアクセスされているため、NullPointerException.

于 2012-05-03T22:00:13.167 に答える
0

まず、すべてのコンパイル エラーを修正することをお勧めします (NetBeans がコード内でそれらをマークします)。

その例外に関しては、何かが のnull98 行目にあることを示していますEjemploJFrameConFondo.java

于 2012-05-03T21:55:25.197 に答える