Figure H-20: File Representation of the VENDOR-INVOICES Trees in Figure H-19
Our problem is that we cannot tell which invoices belong to which vendors from this file. To solve this problem with a linked list, we add a pointer field to every record. In this field, we store the address of some other related record. For example, we place in VENDOR AA’s link field the address of the first in-voice belonging to it. This is RRN7, which is Invoice 110. Then, we make Invoice 110 point to the next invoice belonging to VENDOR AA, in this case RRN3. This slot holds Invoice 118. To indicate that there are no more children in the chain, we insert a 0 in the link field for RRN3.
รูปที่ Figure H-20: File Representation of the VENDOR-INVOICES Trees in Figure H-19
ปัญหาของเราคือการที่เราไม่สามารถบอกได้ว่าเป็นใบแจ้งหนี้ที่ผู้ขายจากไฟล์นี้ เพื่อแก้ปัญหานี้ด้วยรายการที่เชื่อมโยงเราเพิ่มเขตข้อมูลตัวชี้ไปยังทุกระเบียน ในด้านนี้เราเก็บที่อยู่ของบันทึกอื่น ๆ ที่เกี่ยวข้อง Our problem is that we cannot tell which invoices belong to which vendors from this file. To solve this problem with a linked list, we add a pointer field to every record. In this field, we store the address of some other related record. For example, we place in VENDOR AA’s link field the address of the first in-voice belonging to it. This is RRN7, which is Invoice 110. Then, we make Invoice 110 point to the next invoice belonging to VENDOR AA, in this case RRN3. This slot holds Invoice 118. To indicate that there are no more children in the chain, we insert a 0 in the link field for RRN3.
การแปล กรุณารอสักครู่..
