Question: Consider the following class. class ManagedArray { public: float * data; int size; ManagedArray():data(0),size(0){} void setSize(int a_size){ size = a_size; data = new float[size]; }
Consider the following class. class ManagedArray { public: float * data; int size; ManagedArray():data(0),size(0){} void setSize(int a_size){ size = a_size; data = new float[size]; } }; Overload the output operator for this class so that it prints out each element in the data array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
