Dynamic arrays in classes