There is a txt file with words in three columns (columns are separated by tabs) and varying number of lines. There is a fopen
stream, let's call it f
. Counting the number of lines in the counter variable has already been written, and now we need an array of strings. It seems that it should be written as char dict[counter][3][lenght]
, but: 1. Is the array above a label with rows and i
columns containing words of length length
? 2. How to correctly declare this array, if the memory for it should be allocated a function new
? 3. Ideally, a word is a sequence of letters, punctuation and spaces, borders - the beginning / end of a line and tabs. How can I make the word length read into the variable length
, and the word itself into the cell of the array? 4. When I address a word, the call goes to dict[i][j]
, i
from 0 to counter
, j
from 0 to 3, right? Well, for example, the word in the fifth line in the second column has the address dict[5][2]
?
Thanks for attention.