The first issue I can see is that the MAX variable isn't declared or initialized anywhere. I would change your constructor to take an integer and use that to construct the appropriate sized array....