can someone correct this error for me ...
actually the output that lecturer want is follow but i got extra spaces.. i dont know what is the problem .. please help really urgent..Code:node * IPlist::find (string address) const // precondition : none // postcondition : returns a pointer to node containing address or // NULL if not present { node *searchList = NULL; searchList = list; // the searchList point to the first node of list while(searchList != NULL && searchList ->IPaddress != address) // when searchList is NULL and Ipaddress is not equal to Address { searchList = searchList->link; // we go to next nope } return searchList; // otherwise we found the exact Ip address in the link list }
IP address Count
a 3
b 2
c 2
d 1
found d
** your output **
IP address Count
a 3
b 2
c 2
d 1
//extra space
found d



LinkBack URL
About LinkBacks


