I'm reading data from a file with three columns in three different variables, namely cola, colb, and colc. I need this in order to further analyze the data.
However, I have a problem after I read the data because I can not access the data at a given location e.g. cola[3].
I get the error:
error: invalid types 'double[int]' for array subscript
It's because ncola is defined as a pointer to a double, while cola, colb and colc are defined as doubles. Try writing: double cola[34], colb[34], colc[34];