This preview shows page 1. Sign up to view the full content.
Unformatted text preview: an instance of the class LinkedList.
These instances are called (class) objects.
What does the compiler do with this?
It sets aside memory for one LinkedList data
structure – and names it list.
Applied Programming Applied Programming How much space?
Enough for the data component – both the public
and private data.
There is only one copy of the function code,
regardless of how many instances of the class.
So our LinkedList iinstance requires 4 bytes
for Head – and each instance has its own Head.
Applied Programming W hen such an instance of LinkedList iis
created, its version of Head iis not initialised. So
we need to call the function
LinkedList::Initialise(); It looks very much like the way we referred to
stream functions like
cin.eof() and ofs.close().
and ofs.close To refer to a specific instance we use the
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14