Oct 1, 2019 at 2:46am
I have this text file:
0 // initial state
B 0 0 0 0 B // initial cell values on tape
0 0 0 0 R // move right
0 1 0 1 R // move right
0 B 1 B L // when a blank at the right is found, change to state 1 and move left
1 0 0 1 R // if a 0 is changed to 1, change to state 0 and move right
1 1 1 0 L // if a 1 is changed to 0, move left
1 B 0 1 H // if a B is changed to 1, stop
-1 // end of action table
6 // initial position of read/write pointer
I want to know how I can read just the second line of the file as char? Because I need to pass that specific line into a function.