0
How can I get a file .txt
and turn it into a chain of integers?
My program has to take the matrix that is inside the file .txt
and put inside a matrix in the program so I can manipulate the data inside the matrix. The part that opens the file I’ve done, but I’m not finding a way to transform the matrix within the .txt
in a matrix within my program. Please someone help me.
The .txt
contain this data:
0 1 0 0 0 0 0
1 0 1 0 0 0 0
0 1 0 1 1 1 0
0 0 1 0 1 1 0
0 0 1 1 1 1 0
0 0 1 1 1 0 0
0 0 0 0 0 1 1
What is the data format in the file ? Put an example of this file
txt
and the code you already have to read.– Isac
Without an example of how ta the text becomes difficult...
– Márcio Cristian