I'm trying to setup a multithread linked list. I think I have the initial list setup properly. As it says in the title of my post, I can't figure out how to get access to the nodes in the list to add the second thread. Here is the code that I have so far.
void List::setListByName(Winery& winePlace){
Node * node = new Node;
Node * curr = headName->nextName;
Node * prior = headName;
node->vineyard = winePlace;
node->nextName = NULL;
char newWine[CHAR_SIZE] = "Hi";
char currWine[CHAR_SIZE] = "Hi";
winePlace.getWineryName(newWine);
while(curr != tailName){
curr->vineyard.getWineryName(currWine);
if(strcmp(currWine, newWine) < 0){
prior = curr;
curr = curr->nextName;
}
else{
break;
}
}
prior->nextName = node;
node->nextName = curr;
}
void List::qualityScoreSort(List& list){
Node* curr = headScore->nextRating;
Node* previous = headScore;
while(curr != tailScore){
previous->nextRating = list.Node;//?????
list.Node.//????
}
}