Changes

Jump to: navigation, search

Project A3 20141 - OOP344

No change in size, 03:31, 23 March 2014
m
Public Functions: Grammar
==== Public Functions ====
; IntList(): Default constructor. Should set size to 0 and head to NULL.
; IntList(const IntList& src): Copy constructor. Should copy the list of nodes managed by '''src'''. This means that an entirely new list of nodes must be created, one node for each node managed by '''src''', and the value held by each of those nodes must '''equal''' the value held by the corresponding node managed by '''src'''. When this constructor is finished, the size of the current list should be the same as the size of src.<br/><br/>'''TIP:''' After initializing the current object to a '''safe and empty state''', don't forget that you can may call '''any member function''' that the current list has!
; IntList& operator=(const IntList& src): Assignment operator. Should behave similarly to the copy constructor. '''ADDITIONALLY:''' Should do '''NOTHING''' in the case of '''self-assignment''' (ie IntList x; x = x;). If taking action, should clear the list of all nodes before creating new ones ('''make sure that you do NOT leak memory!'''). Should return a reference to the current object.

Navigation menu