const
static
References
friend
There is nothing on the test about stacks or queues, as these were not used in the homework that was due before the test.
Likewise, there is nothing on the test about templates or recursion.
K = new Pile[15];and later I have a line
delete K;What is wrong with this? What would be a better way to do it?
Suppose instead I simply
K = 0;Is that any better?
A. basic constructor B. assignment operator C. operator [] D. copy constructor E. destructor
class Bundle { private: float Height; int * List; // dynamically allocated array of int int Size; // size of list public: Bundle(); Bundle(Bundle & Other); // more stuff };
We would also like to have an assignment operator. Here is some code for it. Fill in the blanks.
____________ Bundle::operator =(const Bundle & Other) { if (_________________________) { List = __________________; delete __________________; for (int I = 0; I < ____________; I++) { ________________________; } Height = Other.Height; } return _____________; }