- #1
John O' Meara
- 330
- 0
For the program segment please see attachment.
THe program compiles and runs but gives the worng answer; its output is suppose to be like below, if you type in "Our second version of table" on a single line you should get:
previous words following line no.
Our second 0
Our second version 0
second version of 0
version of table 0
of table 0
Instead I get:
0xe59ff2b8 Our 0xe59ff2b8 123456789
0xe59ff2b8 second 0xe59ff2b8 123456789
0xe59ff2b8 version 0xe59ff2b8 123456789
etc.,
The program should generate a table of words. When making this concordance I want to gather information regarding the context of each word as well as its line number. To get a context for a word just store its previous word and its following word.
The principle of assigning pointers in the function setLists() may be wrong, it is just that I am out of ideas at the moment. I tried scanning the all code into a rich text format but it didn't process it that well so I decided to just type the revalent parts of the program into a word document instead. If you want the whole program I can attach it as pdf later, just say so. Thanking you in advance for the help.
THe program compiles and runs but gives the worng answer; its output is suppose to be like below, if you type in "Our second version of table" on a single line you should get:
previous words following line no.
Our second 0
Our second version 0
second version of 0
version of table 0
of table 0
Instead I get:
0xe59ff2b8 Our 0xe59ff2b8 123456789
0xe59ff2b8 second 0xe59ff2b8 123456789
0xe59ff2b8 version 0xe59ff2b8 123456789
etc.,
The program should generate a table of words. When making this concordance I want to gather information regarding the context of each word as well as its line number. To get a context for a word just store its previous word and its following word.
The principle of assigning pointers in the function setLists() may be wrong, it is just that I am out of ideas at the moment. I tried scanning the all code into a rich text format but it didn't process it that well so I decided to just type the revalent parts of the program into a word document instead. If you want the whole program I can attach it as pdf later, just say so. Thanking you in advance for the help.