#include <iostream>
using namespace std;
IntSLLNode deleteNode( int node, IntSLLNode ptr );
IntSLLNode deleteNode( int node, IntSLLNode ptr ) {
if( ptr == 0 )
return ptr;
else
if ( ptr->info == node )
return (ptr->next);
else {
ptr->next = deleteNode( node, ptr->next );
return ptr;
}
}
int main()
{
}
How to test this function? shall i send the value of the node that i want to delete it from the main or what?