It should display each line of the text preceded by its line number (starting from 1) and then display a list, in alphabetic order, of each word in the text and the line numbers of the lines on which it appears. Here is the briefYou are required to construct a program that will generate a cross-reference listing of a text provided in a file. ![]() ![]() Are you using Delphi or Pascal? (It makes a difference.)All binary trees are just a fancy form of linked-list, so there is no reason why you can't include a string in your node record.In Delphi: typepNode = ^tNode tNode = recordword: string left, right: pNodeend In Pascal, I'd use a Schema type: typepNode = ^tNode tNode( wordsize: integer ) = recordword: string( wordsize ) left, right: pNodeend If you can't use Schemata, then just make a simple character array: typepNode = ^tNode tNode = recordword: array 1.80 of char left, right: pNodeend Hope this helps.
0 Comments
Leave a Reply. |