As far as how to check goes, you can do something like this:
bool check(plumb_part checker)
{
for ( plumb_part current = firstNode; current != NULL; current = current.next)
{
if (checker.ID = current.ID)
{
return true;
}
}
return false;
}
I havent really gone through your code much yet, but this seems like a general way to do it.
EDIT: Sorry, post went through before I finished typing it >_> There's the full.