Create a class AutoGrowingArray with the following functionalities as follow: AutoGrowingArray(); // AutoGrow Array by increasing the size by 1 at each insertion T operator [](int index) const; T&...



Create a class AutoGrowingArray with the following functionalities as follow:



  • AutoGrowingArray();


// AutoGrow Array by increasing the size by 1 at each insertion



  • T operator [](int index) const;

  • T& operator [](int index);

  • friend ostream& operator >> (ostream& out, AutoGrowArray & Other);

  • ~AutoGrowingArray();

  • void PushBack(T Value);


Using this function create a 2 MB file. And Use the above three implementations and load both the files (please NEVER output the loaded data onto the screen as it will be too many characters, and console displays very slowly.



Evoid CreateRandomFile(string fn, int Size, int RN=100)<br>{<br>srand(time(0));<br>ofstream Writer(fn);<br>for (int i = 0; i < Size * 1024 * 1024; i++)<br>{<br>Writer << rand () % RN <<<br>}<br>}<br>

Extracted text: Evoid CreateRandomFile(string fn, int Size, int RN=100) { srand(time(0)); ofstream Writer(fn); for (int i = 0; i < size="" *="" 1024="" *="" 1024;="" i++)="" {="" writer="">< rand="" ()="" %="" rn="">< }="">

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here