if you must keep the return type void can you change the parameter list to include a reference to int, ie:Code:void IPlist::updateCount(string address, int &count) // precondition : address is in list // postcondition : the count of node with address has been incremented { count = 0; node *tmp = list; while(tmp != NULL && tmp->IPaddress == address) { count++; tmp = tmp->link; } }