Hello, I'm struggling with classes and functions and am trying to load a dictionary in to a char array called Engelv. Here is a sample of the dictionary(as is in the txt file spaces including).
league laar
leagues laare
twelve ratse
one er
two atta
three nelde
four kanta
five lempe
My aim with the following code was to load the English words in to Engelv[1].... and to load its Elvish opposites in to Engelv[2]....
I'm also trying to print out the dictionary to very that it works but i'm getting nothing but junk values.
I think the bug is here: first[50]=gotLine[100]; in line 88
and here first[50] = engElv[0][j][50]; in line 91
and here second[50]=gotLine[100]; in line 98
and here second[50] = engElv[1][k][50]; in line 101
You are accessing 51st and 101st elements of 50-element and 100-element arrays, which could be junk data. Also both loops from lines 89 and 99 repetedly write to the same element in arrays first and second (or specifically just outside those arrays).