Solution to arrayed data member problem