So i have this .dat file that looks like this kind of:
1101010101
1101101000
0101000110
1000101001
1110011111
1000011100
0100100110
1101000011
1001001000
...
with a whole bunch of 10 digit binary codes. I am trying to read in from that file and store what I see in a corresponding 2d array. With my code, my output looks like this:
1101010101
101101000
101000110
000101001
...
The first row works great, but then i start losing the first bit from each row and it starts doing weird things with the return spacing. I'm not sure what I'm doing wrong! Any help is greatly appreciated as I cannot finish this assignment without getting this step right ;;
1101010101
1101101000
0101000110
...
is really
1101010101\n
1101101000\n
0101000110\n
...
where \n is the newline character. You have to clear the newline after each line before reading more data into codesTable.