After the initialization of the array, all values are
null
, not an instance of the
structFile
class, so you cannot call the
structFile
method on them. Before calling this method, create a new class instance:
for(int k = 0; k < file10.length; k++)
{
file10[k] = new structFile();
file10[k].structFile();
}