Revise the definition of the method getPointerToso that the loop is controlledby a counter and the value of itemCount.

What will be an ideal response?

```
template
Node* LinkedBag::
getPointerTo(constItemType& target) const
{
bool found = false;
Node* curPtr = headPtr;
int counter = 0;
while (!found && (counter < itemCount))
{
if (target == curPtr->getItem())
found = true;
else
{
counter++;
curPtr = curPtr->getNext();
} // end if
} // end while
return curPtr;
} // end getPointerTo

```

Computer Science & Information Technology

You might also like to view...

When designing expressions in Expression Builder, you cannot use nested IIf functions

Indicate whether the statement is true or false

Computer Science & Information Technology

Which graphics format does NOT allow you to save images in an interlaced or progressive format?

A. GIF B. SVG C. JPG D. PNG

Computer Science & Information Technology