I am using visual studio for C, where I am making an array of Nodes containing int datatypes (startCount and endCount) from a doubly linked list. So I am inserting the nodes from a d-linked list into this array. Then I am trying to sort it by partitioning it.
And I get the following errors:
left of '->startCount' must point to struct union
expression must have pointer-to-class type
for the following code in the while statement:
int PartitionArray(DListNode*** sortArray){
........
while((*sortArray[left]->startCount - *sortArray[left]->endCount) < (pivot->startCount - pivot->endCount)){
left++;
}
........
}
where in main I have:
int main(){
DListNode **sortArray;
PartitionArray(sortArray);
}
I don't understand how I am suppose to access the values of the nodes through the array passed by reference.