So what's the problem? What you have (with the bare description) looks OK so far.
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
When I try to build this it tells me that "the subscript is not of integral type." It works when I try using int instead of double for linecount and arrayOne but the numbers in the .txt are floating point and I need to keep the decimals.
Subscripts need to be integers.
If you are countinglines, what use is a floating point number? Which line is 3.274? It's either line 3 or line 4.
The problem is that I have been trying to assign the values in the .txt file to the array for about 2 hours and I either get some crazy output, or an error of many kinds.
Without knowing what you've tried, can't help you fix it.The thing is, I have to assign each individual line in the .txt to a different array,
Can you use an array or arrays? Like values[#lines][#valsPerLine] ?I don't understand how to assign the numbers from the array at all
I'm sure you do. It involves an = sign.let alone pick individual lines from a .txt file.
Use fgets() and read 1 entire line. Then you can use sscanf() to read each number out of that line.I thought my description was fairly good...
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944