the range for loop is appropriate only if every item is being accessed sequentially and only if the index is not needed thusin figure the two loops cannot be rewritten as range for loopsbecause the index is also being used for other purposes the range for loop as shown so far allows only the viewing of itemschanging the items can be done using syntax described in section +details like any languagec+has its share of details and language features some of these are discussed in this section pointers pointer variable is variable that stores the address where another object resides it is the fundamental mechanism used in many data structures for instanceto store list of itemswe could use contiguous arraybut insertion into the middle of the contiguous array requires relocation of many items rather than store the collection in an arrayit is common to store each item in separatenoncontiguous piece of memorywhich is allocated as the program runs along with each object is link to the next object this link is pointer variablebecause it stores memory location of another object this is the classic linked list that is discussed in more detail in to illustrate the operations that apply to pointerswe rewrite figure to dynamically allocate the intcell it must be emphasized that for simple intcell classthere is no good reason to write the +code this way we do it only to illustrate dynamic memory allocation in simple context later in the textwe will see more complicated classeswhere this technique is useful and necessary the new version is shown in figure declaration line illustrates the declaration of the indicates that is pointer variableit is allowed to point at an intcell object the value of is the address of the object that it points at int mainintcell *mm new intcell } ->write )cout read<endldelete mreturn figure program that uses pointers to intcell (there is no compelling reason to do this