yap i got tat.. erm,, can you check this error for me please..i have two version....
Code:
void IPlist::updateCount(string address)
// precondition : address is in list
// postcondition : the count of node with address has been incremented
{
node *tmp = list;
tmp->count = 0;
while(tmp != NULL && isPresent(address) )
{
tmp->count++;
tmp = tmp->link;
}
}
Code:
void IPlist::updateCount(string address)
// precondition : address is in list
// postcondition : the count of node with address has been incremented
{
node *newList = new node;
newList->IPaddress = address;
newList->count = 0;
//newList->link = NULL;
if( isPresent(address) )
{
newList->count++;
newList = newList->link;
}
}