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...

________ is the process of encoding e-mail so that only the person with a corresponding key can decode and read the message

Fill in the blank(s) with correct word

Computer Science & Information Technology

Simple formatting tools in Word enable you to change the font, font size, or text alignment

Indicate whether the statement is true or false

Computer Science & Information Technology

When running an append query, the data types of the source fields do not have to match the data types of the destination fields

Indicate whether the statement is true or false

Computer Science & Information Technology

An animated ____ is essentially a series of slightly different bitmap images displayed in sequence.?

A. ?TIFF B. ?GIF C. ?PNG D. ?JPEG

Computer Science & Information Technology