writing a single line of a file in C++ into two different arrays
- by mekasperasky
suppose a text file has 11001100 11001101
and i open the text file and take the input from the file as pt[0]=11001100, pt[1]=11001101..
but if i take the input from file as inpt it wont put it in two different arrays which is obvious but it takes the whole line . Thus I have to take another for loop and traverse through the whole string and when I find a null character i start putting into the second array . But how can I do it without putting it into a variable and traversing .. I mean directly from the file itself ..