C 用の Visual Studio を使用しています。二重リンク リストからint データ型 (startCount
および) を含むノードの配列を作成しています。endCount
したがって、d リンク リストのノードをこの配列に挿入しています。次に、パーティション分割してソートしようとしています。そして、次のエラーが表示されます。
left of '->startCount' must point to struct union
expression must have pointer-to-class type
while ステートメントの次のコードの場合:
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);
}
参照渡しの配列を介してノードの値にアクセスする方法がわかりません。